PHP array of Singapore road names (For Drupal)

Have recently compiled a list of Singapore road names as a PHP array for Drupal. Download it at:¬†https://www.dropbox.com/s/4wt77znchorsscl/singaporephproads_8jun2014.txt You can easily run a regexp filter to remove the enclosing t function on the values to use it in any other applications.…

Using multiple accounts for Git through multiple remotes

In certain cases, more than 1 person might be assigned to pull and update a local repository. The below is a simple way for anyone to use their own git login to pull from the repository by setting up additional remotes: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true…

Android DiskLruCache delete vs deleteContents

A quick note that if you are using DiskLruCache for disk caching, the delete() method actually closes the cache first and then deletes the contents of the directory. If you would like to simply clear the cache without closing it, use the deleteContents() method which takes the cache directory as…

EC2 automated snapshot backup - Auto purging tips

When using ec2-automate-backup.sh available at https://github.com/colinbjohnson/aws-missing-tools/tree/master/ec2-automate-backup, it is useful to note the following: The -r parameter sets the region of the snapshots/EBS volumes which is crucial The -k parameter sets the number of days that each snapshot can live, if you…

Tips to setting up OpenVPN on CentOS 6

Here is a good guide to setting up OpenVPN on CentOS 6: https://www.digitalocean.com/community/articles/how-to-setup-and-configure-an-openvpn-server-on-centos-6 Was following the guide but ran into a few issues which I wanted to share below: Easy RSA is no longer bundled with OpenVPN, so you should git clone it (https:…