Blog

Installing Debian GNU/Linux on a Thinkpad X121e

2011-11-13

Installing Debian GNU/Linux on a Thinkpad X121e Installing Debian (testing/wheezy) on the X121e (AMD) was pretty easy, but the documentation I found online was a little contradicting and confusing. I encountered a few problems. Ethernet Update: You can skip this section if you're using a Linux kernel 3.1.0 or newer. The Installation notes on the Debian Wiki … more

I recently moved my projects to gunicorn and needed init scripts. Here's what I'm currently using. I have the gunicorns running behind nginx, so you might want to tweak the IP and PORT settings. It might also be nice to use start-stop-daemon. more

I have an abstract base class that is used by various other models. The problem is that I need the same method that runs a query on all instances of those models, and that the manager isn't accessible via model instances. This is the code I ended up using. more

Import WXR files from server or on plugin activation

2011-05-23

I recently patched the WordPress reset plugin to make it possible to reactivate multiple plugins after the reset. Until sivel releases an update you can download the patched version from my server (Edit: ancient content removed). As I frequently need to wipe WordPress installs during development I was looking for … more

You can use wget to mirror pages that use cookies to authenticate visitors. That's usually the case when there is a login form on a site. more

You want to make sure the About and Blog pages exist, so create them before if necessary, see http://codex.wordpress.org/FunctionReference/wpinsertpost : wpinsert_post() more

To check for multiple custom fields you have to join the meta table twice. more

Run some code when a new blog is created. I'm not sure, but I guess this code has to be in a network-activated or mu-plugins plugin. Maybe having this code enabled in the blog you're using will suffice. more

This snippet shows how you can add metadata to your existing custom taxonomy. So you can use updatemetadata() and getmetadata() on your taxonomy. The filter on switchblog is only necessary if the code runs on a blog network (recommended to implement anyway). The name of the database table is very … more

Build a custom WordPress query and order the posts however you want them. Notice that this won't work properly if you page results, so it is only useful in very specific cases. Btw, wrap everything into your class and get rid o the global var when you use this ;-) more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo