Archive Page 2
# 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.
# 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.
# 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;
}
}
# 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 »
# 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.

# 
How come that for interface elements in Gnome (in Ubuntu 10.04) we’re still stuck with bitmaps instead of scalable vector graphics.
# 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.
# 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.
# 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
# Android’s strength is cellular voice and data transfer and its low power consumption while Chrome OS has better support for various hardware architectures, and they are both based on the Linux kernel.
If you were to build a tablet that has a touch screen not bigger than 9 inches and a modern browser as its only application, GSM + data connection, instant startup and a batter life of 12 hours, which OS would you choose?
I can’t understand why Google needs Chrome OS. Is it only for devices that don’t have touchscreens?