Update MySQL Database to general utf-8 encoding for backwards compatibility

Fix script for #1273 – Unknown collation: ‘utf8mb4_unicode_ci’


$ mysqldump --compatible=mysql4


<!DOCTYPE html>
    body { font-family:"Courier New", Courier, monospace;" }

<h1>Convert your Database to utf8_general_ci!</h1>

<form action="db-convert.php" method="post">
  dbname: <input type="text" name="dbname"><br>
  dbuser: <input type="text" name="dbuser"><br>
  dbpass: <input type="text" name="dbpassword"><br>
  <input type="submit">

if ($_POST) {
  $dbname = $_POST['dbname'];
  $dbuser = $_POST['dbuser'];
  $dbpassword = $_POST['dbpassword'];

  $con = mysql_connect('localhost',$dbuser,$dbpassword);
  if(!$con) { echo "Cannot connect to the database ";die();}
  $result=mysql_query('show tables');
  while($tables = mysql_fetch_array($result)) {
          foreach ($tables as $key => $value) {
           mysql_query("ALTER TABLE $value CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
  echo "<script>alert('The collation of your database has been successfully changed!');</script>";


How to add an alias to .bash_profile

To add an alias (shortcut) to your terminal use:

alias your_terminal_shortcut='the command the alias should do'



alias ll='ls -la'

To update the current terminal window type source followed by your ‘profile file’:

$ source ~/.bash_profile

Slow Motion at the Meadows

I got new iPhone the other day and decided to try the hi frame rate video capture. Love the simplicity of this new feature and how much value it can add to videos taken using it.

This is a video I took at the Meadows park in Edinburgh last weekend.

New Lamp Stack Icons

These lamp stack icons are leftovers from one of the projects I worked on. Feel free to use them however you want. It would be nice to get some links of where they’ve been used.