Sort posts by modification date in WordPress

By default, WordPress sorts blog posts by creation date. However, if you update your blog posts from time to time, you may want to sort them by modification date rather than creation date.

To achieve this, use this snippet:

function order_posts_by_mod_date($orderby) {
  if  (is_home() || is_archive() || is_feed()) {
    $orderby = "post_modified_gmt DESC";

  return $orderby;

add_filter('posts_orderby', 'order_posts_by_mod_date', 999);

In your theme, just dump this snippet into functions.php. (You may need to create this file in your theme’s directory.)

Special search characters in Firefox

In Firefox, I use the InstantFox add-on to combine address bar and search bar into one item – like in Google Chrome.

But even without this add-on, Firefox allows you to restrict your search by adding a character in front of the search terms, like so:


Notice the * in front of the search term bugs. This restricts the search to bookmarks.

Here’s a list of the most important restrictions:

Character Restriction
* Bookmarks
^ History
% Open Tabs
+ Tags (in bookmarks)
# Search in titles only
@ Search in URLs only

All these shortcuts can be edited in about:config under browser.urlbar.

Etwas veraltet, oder?

Da ich gerade auf Job-Suche bin, bin ich auch bei StepStone gelandet. Dort kann man unter anderem seine IT-Kenntnisse angeben. Allerdings scheint es, dass deren Datenbank seit so ungefährt 11 Jahren nicht mehr aktualisiert wurde:

Wo sind denn hier bitte Windows Vista, 7 und 8?

Bug of the Day: Backup running, ok/cancel?

Today’s bug is a GUI design bug in Windows Server Backup (2012). What do you think of this screenshot?


Why is there an “OK” and a “Cancel” button? What do they mean?

(“OK” means “Close” and “Cancel” means “Stop Backup”. When you start a backup, the button is actually labeled “Close” (instead of “OK”).)

Bug of the Day: Fast Deployment

Today, I’ve been hunting down a bug in Mono for Android (4.4.55). This bug flooded the Android log with this entry (thousands of times):

02-04 17:09:32.010: W/(4300): Bad call to mono_mutex_lock result 11
02-04 17:09:32.010: A/(4300): * Assertion at /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/6418373f/source/mono/mono/metadata/loader.c:2181, condition `ret == 0' not met

This flood of log messages made the whole deployment process very slow (54 seconds to deploy a fresh project).

As workaround I found that disabling Use Fast Deployment in the project settings “solved” the problem for me.

I’m still waiting for an answer from Xamarin on this issue. Update: This problem is tracked here.