Posts

Showing posts from July, 2012

Linux networking issue #1

Change route     $ sudo route Delete default gateway     $ sudo route del default Add new default gateway     $ sudo route add default gw xxx.xxx.xxx.xxx Bring up/down interface     $ sudo ifconfig up/down Config network     $ sudo vi /etc/network/interfaces Restart/Stop/Start network     $ sudo /etc/init.d/networking restart/stop/start Release IP from dhcp     $ dhclient -r Get Fresh IP from dhcp     $ dhclient Ref:Japman, InfraGuy.

Check partition type in linux

Just     $ df -T -h or     $ sudo fdisk -l ref :  http://www.cyberciti.biz/faq/linux-how-to-determine-find-out-file-system-type/

Dig in google-chrome #1

I tried to find why I can't type in input-textbox on some website (known later that has flash 11.3 included). Not sure but the problem gone immediately after I disable flash (some pepper version). So I decide to use flash 11.2r202 from adobe website. In tar.gz type, I discovered that google-chrome not just store files in ~/.config/google-chrome but in /opt/google/chrome as well. Seem like this is the truth solution but not event close, because my chrome does not seem to feel a new plugin (libflashplayer.so). So I try to put it in /usr/lib/mozilla/plugins. From doing this, it's work. That's it. ** Download install_flash_player_11_linux.x86_64.tar.gz from adobe web. After untar we'll get - libflashplayer.sh - readme.txt - usr folder **** you should follow the instruction in readme.txt

Python re module's stuff # 1

When you do something with aws, then you need only ip-address from something like this $ ec2-1-2-3-4.ap-southeast-1.compute.amazonaws.com I used to deal with it like split something then concat with something. Now I just found something cool in python's re module. >>> import re >>> ec2_ip = re.search(r'ec2-(\d+)-(\d+)-(\d+)-(\d+), ).groups() so I get >>> print ec2_ip '1.2.3.4' yaha, love this.