Thoughts on Rails

Riding the Train of Thought

Archive for the ‘programming’ Category

Ghost Redirects in Django…

leave a comment »


What happens when you add a redirect to django urlconf, and later remove it? The browser, keeps redirecting without acknowledging the change in your urlconf! The solution is quite simple, but when in the middle of a deployment marathon, you might just overlook the simplest solution… clear the browser's cache!

Well… I made that mistake of hunting for a difficult solution when answer was obvious, so instead of hiding the fact – let me put it out here, so I'll remember it even better if I encounter a similar problem again 😉

Cheers! Keep calm and hack on!


Written by hiway

April 23, 2012 at 4:13 am

Posted in programming, python

Mute Master Volume – Script for FreeBSD/PCBSD

with one comment

For the FreeBSD users, there’s a bit of a problem when using laptops –
the special volume buttons are usually not automatically recognized.
The following page helps in configuring that:

For configuring the keypress/command association, we use the following port:


You might want to install the following port for making configuring
xbindkeys easier:


Now, there’s only one issue – the volume cannot be muted and unmuted
to its original setting automatically, here’s a small shell
script that resets volume to 60

I wrote a python script that uses commands from above file and
adds persistence of volume setting while automatically muting or
unmuting each time the script is called, also it relies heavily on
UNIX commands – since this script is necessary only on UNIX/FreeBSD.
It will not work under windows.

It also has a nice feature – soft fade-in / fade-out (configurable via script). Especially useful when you mute at high volume and forget it… then play some loud music and unmute – if done using this script, it might not shock with you with sudden loudness. 🙂

All configuration is kept inside the script to keep usage of the script as easy as possible – just a call:


Hope it is useful to anyone looking to solve this or similar issue…

Here’s the file:

Written by hiway

March 5, 2007 at 6:53 pm