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…
If you have large JSON files with application settings in, you need to be sure that the settings only appear once. Not a problem until you get to the stage…
If you need to backup your SVN repositories, then you can use this bash script to do so: #!/bin/bash DATE=`date +"%Y-%m-%d"` BACKUP_DIR=/home/user/svn/backup/${DATE} mkdir -p $BACKUP_DIR for dir in `ls /var/svn/`;…
I use the openvpn command line to connect to a certain VPN site, and I get annoyed at having to find the password everytime So, in the .ovpn file, there…
So you want to have your password remembered by a remote SSH connection? Easy, following these steps On your local machine, create a new SSH key: ssh-keygen It will ask…
Finding files is a little different to MS DOS! find <startlocation> <type> <filename> <exec> The exec is a simple way of performing functions on the results. If you leave it…
If you have just set up a new Centos server and found that the network isn’t functioning, and you have no IP address for it then fear not, its a…
find / -xdev -size +1000000 -exec ls -lh {} \; The above will list files greater than a gigabyte in size… YOu can pipe it to a file if you…
GZIP and TAR are two different utilities bound by the same cause. Compressing files and making file catalogs. To compress a file, simply gzip it: $> gzip database_dump.sql That will…
On Mountain Lion, I found that the my.cnf file is missing. This is because Mac uses the default MySQL settings and therefore doesn’t require a config file. If you want…