First time soldering: Raspberry Pi LCD kit

Adafruit has a great LCD+Keypad kit for the Raspberry Pi with excellent assembly instructions and  a nice Python library. I just had to order one along with my first Raspberry Pi.


After it arrived I picked up a 25W Radioshack Pro-Line soldering iron, some 60/40 rosin-core solder and got to work. Luckily I had an old, dead iPod mini to tear apart and practice on. After soldering the first dozen points I felt like I was getting the hang of it. All-in-all I think it came out pretty well.

Where are all the good WordPress themes?

I just switched to the default WordPress theme Twenty Twelve because my old theme was dated and not mobile-friendly.

Why the default theme? 

Most free WordPress themes suck. They are displeasing to the eye, bloated, and just too “bloggy”. I want a modern, responsive, theme that complements my content. Why is the WordPress community still failing to grasp these concepts? (For the record, “premium” themes also fall short.)

I can’t wait for Ghost. Hopefully its community truly appreciates the concepts that make it a great blogging platform.

Debug your Apache mod_rewrite Rules!

Apache mod_rewrite is incredibly powerful but it’s also a PITA if you’re trying to do something advanced. Luckily, you can log mod_rewrite’s activities and better understand why your rules aren’t working.

Just add RewriteLogLevel and RewriteLog to your Apache VirtualHost config:

 <VirtualHost *:80>
 # ...

RewriteLogLevel 8
 RewriteLog /var/log/apache2/rewrite.log

# ...
 </VirtualHost>

I suggest log level 8 but you can try lower. Logging rewrites will be SLOW: do not enable in production.

Sample rewrite log output:

 [perdir /var/www/local.dev/www/] RewriteCond: input='/small/asdfsadf/avatar.jpg' pattern='^(.*)/(.*)/(.*)' => matched
 [perdir /var/www/local.dev/www/] RewriteCond: input='/var/www/local.dev/www/small/avatar.jpg' pattern='-f' => matched
 [perdir /var/www/local.dev/www/] rewrite 'small/asdfsadf/avatar.jpg' -> '/small/avatar.jpg'
 [perdir /var/www/local.dev/www/] internal redirect with /small/avatar.jpg [INTERNAL REDIRECT]

Details: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelog