Jul 11, 2010
Design
Define your home as a GPS location +/- 50 m. If you are within that area, you don’t have to enter the password. If you are outside that area, you are requested to select three images in the right order from a grid of nine images. If that fails, you are requested to enter the password.
This would be extremely useful for all the tablets out there.
#
Jul 11, 2010
WordPress
Here are two sample scripts along with an API to provide automatic updates for plugins and themes you host on your own server.
Inside /api you’ll find index.php which processes all the update requests. You should place this in something like http://updates.example.com and update $api_url in /plugin/test-plugin-update/test-plugin-update.php and /theme/portfolio-racer/inc/updates.php accordingly. If you activate these sample plugins without changing API URL, updates will be checked against my test server. If you decide to update, both plugin and theme will be replaced with exactly the same version of each.
#
Jul 9, 2010
WordPress
Here is a fix to make the OpenID plugin (version 3.3.2) work with PHP 5.3. Without it, you would get an error when trying to login:
This is an OpenID Server. Nothing to see here… move along.
#
Jun 26, 2010
WordPress
This plugin sets a “version” cookie of your site’s content, which can be used for time-based cache invalidation, as the cookie is checked and updated (if necessary) on each page request through a single AJAX request.
Download: ajax-cache-purge.zip (June 26, 2010)
Installation
Please note that this plugin is intended for people who run their own servers.
- Upload and enable the plugin.
- Add the value of
wp_cache_key_cookie to the cache key.
Nginx Example
fastcgi_cache_path /var/www/cache levels=1:2
keys_zone=wp-cache:10m
inactive=2m max_size=2000m;
fastcgi_temp_path /var/www/cache/tmp;
server {
# other config options
location ~ \.php$ {
# wp_cache_key_cookie is supplied by the plugin
set $wp_cache_key $scheme$host$request_uri|$cookie_wp_cache_key_cookie;
#add key in header for debugging
#add_header WP_KEY $wp_cache_key;
fastcgi_cache wp-cache;
fastcgi_cache_key $wp_cache_key;
}
}
#
Jun 26, 2010
Meta
There is only one brand of laptops used aboard the space shuttles — IBM ThinkPad. In my opinion, they are the best laptops one can ever buy, mainly because of their unspoken hardware and famous red trackpoint mouse.
Several weeks ago the screen inverter of my Dell Latitude D820 laptop (which also has a trackpoint) failed and turned it into a desktop that can only be used with an external monitor. So I found a used IBM ThinkPad A31p (released in 2002), which is now running Ubuntu that supports every piece of hardware inside it. Although I won’t be carrying it around very often because it weights 3.45 kg (7.6 lb), I might make a sticker that says “Used Aboard the Shuttle Spacecraft” and look cool even with a laptop that old.

Read more »
#
Jun 21, 2010
WordPress
Here is the new user interface that I have in mind for the next version of the Widget Context plugin. Feedback and suggestions from everyone currently using the plugin is much appreciated.

#
Jun 19, 2010
Design

How come that for interface elements in Gnome (in Ubuntu 10.04) we’re still stuck with bitmaps instead of scalable vector graphics.
#
Jun 18, 2010
WordPress
Just took the time to create and implement the smartest WordPress cache solution of all time. If your server is able to use cookies for cache keys, I can send you a copy of the plugin to try it out.
#
Jun 7, 2010
Random Musings
Some time ago I said that Apple should call their phones simply by numbers in the order they’re released, instead of adding suffixes such as G and GS. Now they do.
#
Jun 1, 2010
Web Design
After upgrading WordPress to a new version, you might need to clear the APC opcode cache. Here is a simple script that you can store in the root of your website, for example, clearapc.php:
if (function_exists('apc_clear_cache') && $_GET['pass'] == 'secret') {
if (apc_clear_cache() && apc_clear_cache('user'))
print 'All Clear!';
else
print 'Clearing Failed!';
print '<pre>';
print_r(apc_cache_info());
print '</pre>';
} else {
print 'Authenticate, please!';
}
Then call the script via http://example.com/clearapc.php?pass=secret
Instead of using ?pass=secret, you might well call the filename something that is hard to guess: clearapc93920.php
#