Whats my IP from command line
I often need to check my WAN IP address – so this little command will do it for you in a terminal window dig +short myip.opendns.com @resolver1.opendns.com If you alias…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
I often need to check my WAN IP address – so this little command will do it for you in a terminal window dig +short myip.opendns.com @resolver1.opendns.com If you alias…
So, quick and simple MySQL backup in a CRON. #!/bin/bash _hour=`date '+%H'`; _user="root"; _pass="thepassword"; _dest="/srv/backups/daily/"; mysqldump -u $_user -p$_pass --all-databases --ignore-table=mysql.event | gzip > $_dest_$_hour.sql.gz I’ve used this in an…
I found that a script I was running was calling some linux functions using exec() but they weren’t always successful and I couldn’t tell why. exec('command to run'); This would…
I often forget the syntax for getting files over a SSH connection. scp user@address:/path/to/file /path/of/new/file For example: scp root@domain.com:/tmp/mysql/test.sql . Will transfer test.sql to the current folder (.) Also, if…
I have a laborious task at the moment, of exporting our server process list to see how much memory certain programs are using. I was getting a little bored of…