Fixing Twitter Bootstrap rendering issues in Internet Explorer

Internet Explorer’s interpretation of CSS compared with all the other browsers sometimes bewilders me. To get Twitter Bootstrap to render at all like the other browsers, apparently it’s important that you have to specify the doctype, otherwise it seems to render layout related CSS all over the place. Just include this at the top of your source:


I found this as an answer to this post on StackOverflow.

Resizing your Debian root fs on Raspberry Pi

Once you’ve copied one of the Debian disk images to an SD card, you may have noticed that the disk image is only for 2GB and you have a lot of unused space on your SD card. The raspi-config util has an option (Expand Root FS) to resize your root partition for you. There’s also plenty of other utils to do the job. I used gparted from a gparted LiveCD booted on my Mac to resize my partition and it worked well.

Configuring a static IP on Debian Wheezy for Raspberry Pi

$ sudo nano /etc/network/interfaces


iface eth0 inet dhcp


iface eth0 inet static

Below this line enter the following, replacing x where necessary for your network config.

address 192.168.x.x
network 192.168.x.0
broadcast 192.168.x.255
gateway 192.168.x.x

Things you always forget: XML Character Entities

Certain characters break XML or need to be escaped in HTML so they are rendered literally and not interpreted themselves as markup. There’s a few predefined character entities that are commonly used:

  • &lt;      :     <
  • &gt;     :     >
  • &amp; :    &

For other characters though, you sometimes need to use their Unicode encoded value. For example to literally display { and } in a JSP or JSF page (since they are used in EL syntax ${} and #{} ), you can use their unicode values like this:

  • &#x007b;     :     {
  • &#x007d;     :     }

There’s many unicode ref charts online, here’s one that I’ve used: