On the 11th of May 2014 at 7:10 PM my dog, Gurbe-Jan, took his last breath. Gurbe-Jan, a Bernese Mountain Dog, has been with me since he was only 7.5 weeks old. He died at the respectable age of 10 years and 7 months.
He was an unique dog that came into me and my family’s life at just the right time and quickly became a big part of our life. The loss is great and the house feels really empty now and feels less like home. And though he’s being missed dearly we celebrate his life by the many great memories we have of him.
Goodbye, my friend.
Virtual Private Servers are usually installed with the minimum required software. More often than not this means Bash auto-completion isn’t enabled, which is a tad bit annoying as it slows down navigation.
To fix this you can install the
bash-completion package. Like so:
$ sudo apt-get intall bash-completion
Something I accidentally discovered is that in Windows 8.1 (and probably 8 as well – and Windows 7) you can use the Windows key + a number to open an application from your task bar!
So lets say you’ve got Google Chrome at position 1, Thunderbird at 2 and Visual Studio 2012 at position 3. To open Thunderbird simply press Windows key + 2. For the other applications use their position number.
Useful? I don’t know, but it’s nice to know this shortcut exists to keep your hand away from your mouse I guess.
On type of query I always have to run when moving a website from its test environment to its live environment is to replace the test domain in all content pages with the live domain. With SQL this can be easily done with the
REPLACE(text, search, substitution) function.
SET some_field = REPLACE(some_field, 'test.example.com', 'example.com')
This updates all records in the table
some_table and replaces
example.com in the field
Knowing which SQL functions exist can really help a lot and save time to update data.
Occasionally when I copy and paste something from an external source into Vim every line gets indented, which is probably not something you want when pasting a code snippet.
The solution to this problem is an easy one. Before pasting, first execute
:set paste, then paste your content and to return the setting to its previous value execute