Introducing django-simple-menu - A simple menu app for Django

Yesterday I released the first public version of django-simple-menu, which allows you to define your applications menu/navigation through the use of two simple objects.

The app was built as part of an internal project after we failed to find an existing menu system that was straight forward, didn’t use the database for anything and allowed for complex menu items that were able to be influenced by the current request. It has been refined over the past three years and has now been split out into its own project as I need to re-use it in another site build.

Checkout the code on GitHub: https://github.com/fatbox/django-simple-menu

Documentation: http://django-simple-menu.readthedocs.org

Where’s the RSS option in Mail.app in OS X Mountain Lion?

Last year I tried to upgrade from Snow Leopard (10.6) to Lion (10.7), and I HATED it. So much so that I wrote a scathing blog post about.

A few weeks ago after hearing that Mountain Lion (10.8) would be the last version to support directly upgrading from Snow Leopard (10.6) I decided to take the plunge and give Mountain Lion a try. If worse came to worse at least I’d be able to downgrade back to Snow Leopard again…

I have to say, so far I’m actually quite liking Mountain Lion. I had to go and get Total Spaces to get the control over my virtual desktops that I want, but other than that my experience with 10.8 has been really good so far.

Today, however, I noticed that my RSS feeds that normally show up in Mail.app weren’t there. “Strange” I thought, maybe they needed to be re-added after the upgrade. But to my dismay I found out that Apple has indeed discontinued RSS support in Mountain Lion…

At least they were nice enough to leave them in the Info.plist file so that you can get them back through a little terminal magic.

I guess I can live with having to run Google Reader in a Fluid Site Specific Browser (just ‘cause Google Reader is awesome), but I sure am going to miss my daily photo blogs showing up inline with my mail every day.

Why isn’t unarchiving built into CIFS & AFP yet…

As I sit here and wait for a giant .zip file to expand onto my network file server it reminds me of how totally crazy this situation is!

I mean, I want to expand a zip file and I want its contents to end up on the file server. Presumably, if you can implement something as complicated as CIFS or AFP implementing at least zip & rar decompression and extraction routines should be simple. The client should query the server for its capabilities and then ask the server to expand it. Done, fast, simple.

End of rant.

Forcing a Linux kernel panic

During my testing of our setup for our unmanaged KVM product I needed a way to force a real kernel panic so that I could test some of our systems. After some research I came across this blog comment that is a simple, straight forward way to cause a *real* kernel panic through the use of a custom kernel module.

To do this you’re going to need the basic build tools (make, etc) as well as your kernel headers. On Debian you can get these by running:

 apt-get install build-essential linux-headers-`uname -r` 

Once you have your build tools setup make a new directory to do our work in, I called mine: force_panic

In this directory we’re going to need to setup two files; a Makefile to build the module and the actual .c file that contains the code for the module. Their contents are below:

Makefile

obj-m := force_panic.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

force_panic.c

#ifdef __KERNEL__

#include <linux/module.h>
#include <linux/kernel.h>

static int __init panic_init(void)
{
panic("force-panic");
return 0;
}

static void __exit panic_exit(void)
{
}

module_init(panic_init);
module_exit(panic_exit);

#endif

Now to build the module just issue the command:

make

Once the build process is completed you should be left with a new file named force_panic.ko and you can panic your system by running:

insmod ./force_panic.ko

BIG FAT WARNING — The instant you hit enter on the above insmod command your system will halt. You made it panic after all…

Greets to the author of the original post & comment.