Backup all SVN repos
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/`;…
Numerical Data Types in MySQL
In most MySQL GUI’s that offer the ability to alter the table definitions of a schema, if you add a column that is an INT, if defaults the syntax to…
Annoying IE Compatability Mode
I recently had to create a site for an education facility, and they turn on Compatibility mode for all their networked PCs, for legacy support. This was messing around with…
Disabling certain days in jquery UI datepicker
I wrote a site for my local pub and it involved a restaurant booking section. The user could select a date and a time (plus name, phone number and number…
Connecting to MSSQL
I have had to create a few PHP sites that connect to a MSSQL server. Not being down with setting up these servers, there are a couple of caveats you…
Redirect certain IP address .htaccess
If you ever wanted to prevent certain IP addresses from accessing your site, you can easily acheive this in the .htaccess file. Simply list the IP addresses and then redirect…
Convert a MySQL database to UTF8
This is a “script” to convert your latin1 myisam database to utf8 innodb Dump the database mysqldump -u root -p database_to_convert > db.latin1.sql Make a copy of the dump cp…
Convert Excel headers to numbers
Quite often I have to convert datasets from one source to another target. Sometimes I can only export them as CSV to investigate the field order/column structure Then, once I…
Find a file containing a text string on Linux
There is a very useful command in Linux, called grep. It is a utility for searching plain text files using regular expressions. You can either search files and folders as…
Google Fonts – nasty bold
Say you are using Google Web fonts for some CSS. Well, if you don’t include the correct bits you may encounter this problem. Say, you use the Ubuntu font, for…