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/`;…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
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/`;…
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…
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…
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…
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…
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…
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…
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…
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…
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…