Sunday, December 28, 2014

Switch from gnome to text mode

On Ubuntu, you can switch to text mode and go to a tty session.

To switch to 1 to 6 tty session, do
CTRL+ALT+1  for example

To go back to the gnome session, do
CTRL+ALT+7

Wednesday, October 22, 2014

wget


-- doing a post with wget:

wget --post-data="q=(Panasonic)&start=0&rows=1000&wt=json" http://threes1.be.p1.com:8080/solr/offers/for-matching?
store output wget in a file
wget -qO- http://www.cnn.com > toto.txt

Thursday, July 10, 2014

CentOS specific


To disable the firewall installed by default on a new CentOS
> service iptables stop

---- change DNS
[root@stage-vm3 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/init.d/network restart
vi /etc/resolv.conf

Friday, March 7, 2014

Crontab Survival Kit


# ----- pregen,  */X  means first, first+X, first+2X, etc
55 23 */2 * * cd ~/image/extract-header && bash ./script_pregen.sh
55 23 */3 * * cd ~/image/extract-header && bash ./script_pregen_other_cats.sh