Meaning of Tingo

August 4th, 2011 § 1 comment § permalink

A wee while ago I came across a quirky book about a guy who became fascinated by the useful and sometimes strange words that exist in other languages with no direct translation into English.

Here’s a few good ones:
bakku-shan [Japanese] – ‘a woman who appears pretty when seen from behind but not from the front’
Serein [French] – ‘the rain that falls from a cloudless sky’
Dreich [Scottish] – ‘a miserably wet day’
Hygge [Danish] – ‘complete absence of anything annoying, irritating or emotionally overwhelming, and the presence of and pleasure from comforting, gentle and soothing things’
Saudade [Portuguese] – ‘refers to the feeling of longing for something or someone that you love and which is lost, stronger than nostalgia’

The word voted hardest to translate:
Ilunga [ Tshiluba, Congo]‘a person who is ready to forgive any abuse for the first time, to tolerate it a second time, but never a third time’

And then there is an English one that is hard to translate into other languages:
gobbledygook
– ‘jargon-filled language that is difficult to read, maybe intentionally confusing’

The elephant lift!

March 25th, 2013 § 0 comments § permalink

I have been trying to do this for a very long time to no avail and then all of a sudden i had a eureka moment and it just happened. I’m so chuffed I felt the need to share. Dodgy technique toward the end but easy to fix.

New trick

March 18th, 2013 § 0 comments § permalink

Currently working on a new trick that just requires me just to climb higher, somersault faster and hope i manage to catch. I’m sure there’s a metaphor in there somewhere…

Best time to send an email – inforgraphic by kissmetrics

June 8th, 2012 § 0 comments § permalink

Not posted in a while which means business is good :)

June 1st, 2012 § 0 comments § permalink

Outwith web development the last few weeks have been all about hoops. I have been learning Hula hoops tricks and I was fortunate enough to attend an Aerial hoop workshop hosted by an ex Cirque du Soleil performer. While I crack on with the work here are my favorite videos of Hoops right now.

Github 404 with Parallax Scrolling

April 12th, 2012 § 0 comments § permalink

Can’t beat a good 404 page. Click on the image and hover over the image that loads to see it in action.

Scheduled daily cron database and web files backup

March 28th, 2012 § 0 comments § permalink

Everyone has their own preferred way of doing things but I have found this method to work well for me. If your working in a standard LAMP environment then you can create a cron job that creates 30 or 31 days (depends on days in the month) of backups until it starts overwriting itself. Useful if a client wants to roll back to a particular day that week/month, they also find it comforting to know they have 30 days of backup. Of course if the website has a lot of image or video files this will use up a lot of space in which case you can create a single overwriting daily backup by removing the date from the end of the backup filenames I have suggested below (_`/bin/date +\%d`).

To start editing the cron type in:

> crontab -e

By default it will open with vi or pico, if you have a preferred editor, mine is emacs, you can type:

> export EDITOR=”emacs”
> crontab -e

You will notice that the e and r keys are scarily close to each other on the keyboard and if you happen to type in ‘crontab -r’ it will delete your entire cron file without warning. So be careful and back it up. I did do this in one of my first jobs. It was not a good moment.

Its a good idea to put the following line at the top of your cron so it emails you if any of the scripts fail.

MAILTO=youremail@gmail.com

[In emacs ctrl x ctrl s to save the file without closing. ctrl x ctrl c to close]

File system backup

You will have to create two directories in your backups location. For this example it would be:

> mkdir live_backup
> mkdir live_backup_tars

—————————————–
CRON EXAMPLE
—————————————–

# This will sync files from your live web directory to your backups directory at 5.20 everyday.

20 5 * * * rsync -auCz –delete  /var/www/<live directory>/. /var/backups/live_backup/

# This will tar the backups directory and append the day of the month to the filename, it then gunzips the tar, all at 6.10 everyday
10 6 * * * tar -cPf “/var/backups/live_backup_tars/backup_`/bin/date +\%d`.tar” /var/backups/live_backup/; gzip -f /var/backups/live_backup_tars/backup_`/bin/date +\%d`.tar;

—————————————
END CRON
—————————————

Now for obvious reasons you want your backups folder to be in a different location to your live files, my server comes with separate backup partition that is then backed up by the provider which makes the rsync straight forward. If you need to backup from one server to another you need to do something more like this:

20 5 * * * rsync -auCz –delete -e “ssh -i /root/rsync/debian-dev-rsync-key” syncer@<ip address of live>:/var/www/live/. /var/backups/live_backup

For this to work you will need to setup a pass phrase so the rsync can happen without you manually having to enter the password for the server it is backing up:

On Machine to  backup
> ssh-keygen -t rsa // no pass phrase
> chmod 600 ~/.ssh

On backup machine
> cd ~/.ssh/
> touch debian-sync-key.pub
> emacs debian-sync-key.pub -> paste key
> cat debian-sync-key.pub >> authorized_keys
> chmod 700 authorized_keys

Backing Up the Database

Assuming that the database is hosted on separate server to where your backup cron is running you need to give your database access to your backup server.

> emacs /etc/mysql/my.cnf
> bind-address  = <server ip=”thebackupip”></server>
>/etc/init.d/mysql restart

Then you want to create a user that can only select data from the tables, you can lock this down more by substituting the % for the IP address of your backup server:

> mysql -uroot -ppassword

mysql > CREATE USER ‘test’@'%’ IDENTIFIED BY ‘****************’;
mysql > GRANT SELECT , REFERENCES , LOCK TABLES ON * . * TO ‘test’@'%’ IDENTIFIED BY ‘****************’

Finally the cron entry will look like this:

# create a mysql dump of the database at 5.10am daily
01 5 * * * /usr/bin/mysqldump -hremoteip -utest -p***** livedb > “/var/backups/live_backup_db/backup_`/bin/date +\%d`”

Where remoteip is the IP address of your live database server, test is your newly create db username and ***** is the password for DB and livedb is the database name. If you need to restore from a backup, ftp or scp the backup file to a location your live db server can access and then:

> mysql -uroot -ppassword
mysql > source /tmp/backup_01

BE CAREFUL with this as it will completely overwrite your current database with the backup file.

Hopefully this has been helpful. Any questions just let me know.

 

 

 

Using my skills for good

February 20th, 2012 § 0 comments § permalink


Drawing inspiration from this video, it had always been my plan to build at least 1 Pro bono website for a charity in need per year so I am on the outlook for a worthy cause. Please let me know if you know of one.

Not everything is available for instant gratification. It’s about the waiting, the hunting or the serendipity.

February 16th, 2012 § 0 comments § permalink

 

301 Permament redirect via apache virtual hosts file

February 8th, 2012 § 0 comments § permalink

I had a hard time coming across a tutorial online that showed correct syntax on how to setup a permanent redirect for a domain. You may have bought multiple permutations but you want them all to resolve to one address, this is best for search engine optimisation. The example below redirects any links starting with laurenkyla.co.uk to laurenkyla.com with a permanent 301 code.

<VirtualHost *:80>
ServerName laurenkyla.co.uk
ServerAlias www.laurenkyla.co.uk
RewriteEngine on
RewriteRule ^/(.*) http://www.laurenkyla.com/$1 [L,R=301]
</VirtualHost>

Pinterest – What is the secret to their success?

January 25th, 2012 § 0 comments § permalink

So I read about Pinterest on a blog and checked them out and it looked like a smart idea well executed but did not immediately strike me as something dramatically different from the other handy tools and sharing sites out there. But if you look at their twitter profile they already have over 300,000 followers and made 3000 tweets and they are valued at $200 million and I have to admit I did find myself strangely addicted to using it. So what is the secret to their success?

“Pinterest has tapped into the idea of helping people process and understand a huge amount of information and choice on the internet, and has become a self-expression engine.” Business Insider

I love that phrase ‘self-expression’ engine. Various articles claim that their success has been due largely to word of mouth or the fact that it primarily appeals to women, who are the largest users of social networks. Either way its yet another case that proves that their still exists massive opportunities for success online out of seemingly simple concepts where your users are doing the hard work for you and generating all the content. Now just need to come up with a good idea…