Navigation

Main page

Blog

Webcomic

Music

Animations

Games

Writing

Other stuff

Links

Feeds

RSS

Atom

Check these out

My other sites

EddieMcLean.com

Mod Rocker

Middlerun abroad

Twitter

YouTube

Last.fm

Don't spam me

Email

Also

Thursday, December 17, 2009

So you want to hand me a book

I was in the city a few weeks ago, minding my own business when some Hare Krishna guy gave me a book. A fat hardback book, full of glossy colour illustrations which he eagerly pointed out to me, opening the book while it was still in my hands.

It's not the first time this has happened. A few years ago some other guy gave me a book hilariously named "Teachings of Queen Kunti". He assured me it would be the best book I would ever read, which I suspect would not have been true even if I had read it.

I'm not crazy about being handed stuff I don't want. For example, one of the worst things about UNSW is that there are perpetually people at the front gate handing out flyers and pamphlets and pestering me about stuff I don't care about when I'm trying to get to a class (though I suspect it is the same at every university). That's one of the advantages of having a motorbike - I can ride my bike straight onto campus and park there, bypassing these twerps. A guy called Samuel Kass had a good idea: a pamphlet to give to people giving out pamphlets called So You Want to Hand Me a Pamphlet.

At least if it's a flyer or something I can just throw it away. But I feel weird about throwing a book away, even if I know I'll never read it. I've got better things to read, books that have been sitting on my shelf unread for years - interesting ones. I'm not going to go reading a (presumably religious) book some guy in orange robes gives me. But what really gets me is that these guys give you a book you don't want, and then have the gall to ask for a donation in return. "Most people give ten or fifteen dollars", the guy assured me.

For some reason I felt as though it would be uncalled for to tell him to shove it up his arse, and even just giving him back the book would have been awkward, so like a stupid sucker I dug a few dollars out of my wallet, insincerely apologising that it was all I had (which wasn't true, but I'm not going to reward someone with ten dollars for interrupting me as if I've got nothing better to do). Due to my paltry offering he politely swapped that large hardcover book for a smaller, paperback volume called "The Science of Self-Realization" (taking, I suspect, rather a creative liberty with the word "science").

This seems like a marketing loophole. Traditional marketing is about making people want something so they'll buy it. What this guy and his ilk have done is bypassed the "making people want it" stage, by giving people stuff and then exploiting their sense of social awkwardness and unwillingness to offend a friendly religious person to make them pay for what they never wanted in the first place.

And now this book is sitting on my shelf. I don't want it. I'll never read it. I don't want to throw it away because I sort of payed for it. Maybe I should write a book of my own, and hand it out to anyone in an orange robe. It will be called "I Don't Want Yer Damn Book: How To Avoid Creating Animosity Towards Your Cause".

Labels:

Tuesday, December 15, 2009

Hasta la vista, frozen app

I just came across an article, 6 Different Ways To End Unresponsive Programs In Linux. One of the methods caught my attention, the program xkill, which turns the mouse pointer into an app-killing cross of doom.

There's a cool effect in Compiz Fusion on Linux, where any window that is closed erupts in fire and burns up as it closes (it's part of the Animations Add-On plugin, more info here). When combined with xkill, it's pretty much like shooting the window. I decided to extend this by adding some shotgun sound effects. All it takes is a very simple shell script:

#!/bin/sh

play /usr/local/share/xkillshot/gun_cock.wav &
xkill
play /usr/local/share/xkillshot/shotgun.wav


I call it xkillshot. When you run the script instead of running xkill directly, it first makes the shotgun pumping noise and arms the cursor. Then when you click the window the shotgun noise goes off and the program is killed.

The script goes somewhere in your $PATH such as /usr/local/bin and it requires the two files gun_cock.wav and shotgun.wav to be in the directory /usr/local/share/xkillshot and also seems to require the package sox, to enable the play command. Make sure the script and audio files have the right permissions. You can run it through a terminal or use Alt+F2, but for best results set a shortcut key. I used Ctrl+Alt+K. Any time Firefox or whatever freezes, I can just hit the shortcut to whip out the app-killing shotgun and blast it to pieces.

(I was going to make a video to demonstrate the awesomeness, but I can't seem to find a Linux video editor that doesn't suck balls. Pitivi had hardly any features, OpenShot has more features but as far as I can tell they mostly either don't work or cause the program to crash, Kino for some reason needs to convert the files into DV format which takes forever, Cinelerra is complicated and resource-heavy and Kdenlive is impossible to install. I have yet to try Open Movie Editor, but it hasn't been updated in nearly a year, not to mention it has a butt-fugly interface. I don't think I've tried LiVES either. But that's another blog post.)

EDIT: Here's an updated version of xkillshot which doesn't make the shotgun noise if you right click to cancel xkill.

#!/bin/sh

play /usr/local/share/xkillshot/gun_cock.wav &
xkout=`xkill | wc -l`
if [ $xkout -ne 1 ]
then
play /usr/local/share/xkillshot/shotgun.wav
fi


Be careful with this. As it says in the manpage, xkill is a dangerous program. It doesn't just close the window, it instantly kills the process which can cause you to lose unsaved data, so it can screw things up if you accidentally kill a process you shouldn't. I learned the hard way not to close a Nautilus window this way - Nautilus closed completely and all my desktop icons disappeared until I restarted X. But if Firefox freezes or something and you need to kill it, this is quicker than using the System Monitor and more fun than just using xkill on its own.

Labels: