September 08, 2011

S3 Access

Two ways to access your S3 buckets: jets3t and s3cmd. Jet3set provides UI and s3cmd is only UI.
Here is how to get a file using s3cmd: First configure the account:
s3cmd --configure
Then, you can use s3cmd to access your buckets. eg: downloading a folder from s3:
s3cmd get --recursive s3://bucket_name/object_name to_local_file

Mysql command line basics

show databases;
use db_name; 
show tables; 
describle table_name;
These will get you enogh info to run your real SQL command..
The other way is just to use the UI app eg. MySQL Query Browser

September 02, 2011

bash alias and colorful ls

Everything below should go under ~/.bashrc
alias la='ls -la'
alias gopen='gnome-open'
alias gterminal='gnome-terminal'
alias ls='ls --color'

PS1="\`if [ \$? = 0 ]; then echo \e[33\;40m\\\^\\\_\\\^\e[0m; else echo
\e[36\;40m\\\-\e[0m\\\_\e[36\;40m\\\-\e[0m; fi\` \w> "
NOTE: Make sure alias comes after PS1. PS1 is for cutom prompt.