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 permanently redirect static content to a subdomain with .htaccess, published: 2010-03-27 17:33:43
I wanted to move all my static files to a sub domain to comply with good standards and use a Content Delivery Network. I set up a sub domain and moved all the images, style sheets and javascript...
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 create a table of contents with javascript and prototype.js, published: 2010-03-14 23:31:21
Well, if you write long posts every now and then and you want your users to access the information in an easy way instead of splitting up the post in several pages, this is a very nice solution to...
How to highlight search parameters from Search engines with javascript and prototype.js, published: 2010-03-14 18:38:31
I needed some code to help visitors on one of our sites at Aller Internett, to be able to spot the content where the search parameters where mentioned. After some searching and tutorial...
How to make a transparent png that IE6 supports with The Gimp, published: 2008-10-21 10:33:38
Quick short and simple! 1. Open the original image. 2. Set a proper background colour as oposed to it being transparent. It is best to make this colour similar to the background colour of the...
How to use javascript to insert text at cursor position in a form input element, published: 2008-09-24 09:24:26
Was stuck in a rut here with a JavaScript problem, but I did some active research that I became very happy with: function InsertTextAtCursor(input, valueString){ //IE support if...
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 flash your bios from linux with no dos/windows or no floppy drive, published: 2008-09-05 12:26:15
This is a simple how to that I picked from the web, I take no credit from this guide, give the credit to the guys from LinuxInsight.com that wrote it! Step 1: Download FreeDOS boot disk floppy...
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,...

My latest tweets, follow me

Alexander on the web

Follow me on Spotify

Subscribe