Find, replace, and increment at each occurence of string
perl -ple ‘s/num/$n++/e’ filename
perl -ple ‘s/num/$n++/e’ filename
//work in IE7 IE8b2 FF2 FF3 SF3.1 OP a[href^=‘http://’] { padding-right: 15px; background: url(extern.gif) right no-repeat; } a[href^=‘http://www.OWNDOMAIN.com’], a[href^=‘http://OWNDOMAIN.com’] { … Read More »css for web- and maillinks
‘selecteur’ { outline: none; }
$foo = strip_tags($source, ‘<body>, <a>, <br>, <strong>, <b>, <i>, <em>, <font>’); ereg (“<body([^>.]+)>(.+)</body>”, $foo, $regs); echo $regs[2];
lynx -dump http://www.whatismyip.com | grep -i “Your IP is” | awk ‘{ print $4; }’
uninstall Postgres 9.4, install 9.3, backup the database using pg_dumpall > backup.sql, uninstall Postgres 9.3, install Postgres 9.4, restore the databases using psql -d postgres… Read More »Upgrade Postgresql
The cd or dvd reader was mounted on /dev/cdrom sudo hdparm -d1 /dev/cdrom sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup sudo gedit /etc/hdparm.conf Add in this file, the… Read More »Acccelerate CD/dvd player
export PROMPT_COMMAND=“${PROMPT_COMMAND:+$PROMPT_COMMAND ; }”‘echo $$ $USER “$(history 1)”|logger -p user.alert -t bash_history’ readonly PROMPT_COMMAND
#Pour changer les permissions récursivement sur les dossiers sans toucher aux autres fichiers : chmod u-w $(ls -l -R | sed -n ‘/^d/p’ | awk… Read More »Changer les permissions récursivement sur les dossiers uniquement
First of all you will need to ensure that your database is stopped: root@steve:~# /etc/init.d/mysql stop Now you should start up the database in the… Read More »Resetting a forgotten MySQL root password