Posts in How To
Javascript Hash onChange event,
published: 2010-10-01 11:18:56
A pretty nifty solution to bind an event (err) to the window.location.hash string.
var onHashChange = function(event) {
//get hash function
var getHashValue = function() {
var arr =...
How to override CSS with JavaScript,
published: 2010-08-31 09:56:04
A pretty nice snippet that I use all the time to override CSS set with the !important switch.
function addNewStyle(newStyle) {
var styleElement = document.getElementById('styles_js');
...
How to detect iPhone, iPad, iPod with JavaScript,
published: 2010-05-06 11:10:43
Just a very quick and easy way to detect Apple's devices:
var isiPad = navigator.userAgent.match(/iPad/i) != null;
var isiPhone = navigator.userAgent.match(/iPhone/i) != null;
var...
How to install a LAMP server on Ubuntu,
published: 2010-03-27 15:29:55
I was trying to install a LAMP server locally and after some guides and questions I managed to get it up and running smoothly. How hard is it? Well, it is not that hard, thanks to Tasksel (Note:...
How to add a search feature to your blog for cakephp,
published: 2010-03-17 21:51:38
I was looking for a decent search feature to add to my blog, and after some reading around, I found this feature very easy and interesting. I found a how to in the bakery, but as several users...
How to Add icons to links with css,
published: 2010-03-15 20:24:55
Have you ever thought your links looked boring and that they needed the little extra? Well, fear not, for I have the solution!
The CSS
Put this in your css file, preferably after your global...
How to put a gravatar on your blog,
published: 2008-09-19 12:21:29
Gravatar, what is it? Gravatar stands for Globally Recognized Avatars. A gravatar is an avatar that's linked with your email adress. This avatar can be used on all sites that support Gravatar....
How to remove empty lines in vi/vim,
published: 2008-09-05 17:42:20
Some simply ways to remove empty lines in a file:
# Use this sub:
:%s/^\n//
# Or this:
:g/^$/d
# Or this:
:g/^\s*$/d
How to get your ice.net d50 modem to work on ubuntu,
published: 2008-09-05 15:48:44
A quick little how to on how to get your d50 modem to work on Ubuntu. I used the d50 on my laptop my entire summer vacation and it worked perfectly!
The basic setup
Install wvdial if you don't...
How to speed up your site,
published: 2008-04-03 16:32:52
How can you speed up your site on an Apache PHP server? Piece of cake if you ask me. How simple is it? With some copy and paste jobs from my article you can speed up your site significally. Follow...
Mod_rewrite made easy,
published: 2006-08-08 13:07:14
Lately I've been trying to make all my links to look so pretty that even art critics could say something nice about them, and to make it easier for visitors to remember my links. And believe me,...