Merge .vimrc from eeepc
git-push-wd: Work in subdirectory, print out all commits

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Import correctcase.py (mp3 English Title Capitaliser)

This is something I wrote a few years ago and was one of the first
pieces of non-trivial python code I wrote. It's been sitting on my old
laptop nagging at the back of my mind that it was still missing from my
junk code.

It goes through an mp3 music collection and corrects the capitalisation
on all the artist, album and title fields. It tries to handle a bunch of
edge cases and always asks for confirmation before making changes, so it
should be pretty safe to use.

I guess the main thing it's missing is ogg & flac tag support and
perhaps a better UI.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Import striptags.sh

This is another script I wrote a couple of years ago and it's about time
it moved into junk code along with everything else.

I have previously blogged about this:
http://darkstarshout.blogspot.com.au/2009/01/new-years-resolution-massive-music-tag.html

Looks like there are a couple of comments on that post that I should integrate...

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Add firefox userChrome.css to remove CPU hogging throbber

My XPS laptop has some horrendous performance issues in the nVidia
binary driver that are provoked by the "throbber" animation in Firefox.

htop shows xorg's CPU usage as near 100% during these times, and Firefox
becomes temporarily unresponsive (other X11 clients are unaffected and
remain completely responsive) - I've been living with the tab bar
disabled as a workaround, but that isn't really practical.

It's quite obvious while loading some tags that obscuring and revealing
the firefox window only shows one thing - that damn spinning throbber.

I also have several perf runs (of xorg) taken in these 100% CPU usage
times that show 50% of cycles spent somewhere in nvidia_drv.so (from
the xserver-xorg-video-nvidia 302.17-3 package) and another 20% in
read_hpet. One run showed a tonne of spin_lock contention, but so far
that hasn't reproduced.

It's not clear why this affects my XPS (With an nVidia GeForce Go 7950
GTX -- upgraded from a GeForce Go 7900 GS which had the same problem),
but not my Thinkpad with an nVidia Quadro something-or-other.

This css file, based on the below URL, removes the throbber element that
causes so much trouble.
http://thinkmoult.com/2009/02/24/tech-tip-speed-up-firefox-to-use-less-cpu/
I had to use DOM Inspector to find the new class name for the throbber.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Rename desktop directory to config

I've been thinking about doing this for a while now... With more and
more things being added I think it's probably important I do this now
before too many more symlinks and URLs point to the old directory.

Create a desktop symlink for compatibility, to be removed as soon as I
update all the external stuff that points here.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Add option parsing + config file

Rather than hard code the bluetooth address of the NAP to connect to we
can now either read it from a config file, or have it passed in on the
command line.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Improve message when no bdaddr is provided

This message is especially helpful in case someone runs this as sudo
./blue-tether and the config file is in their personal home directory.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Python and shell scripts to set a bluetooth device as trusted

I had some weirdness where my Android tablet only seemed to allow the
most recently paired device out of my mac mini and my eeepc to connect
and thought it might be a trust issue, so I wrote these to mark a
particular bluetooth device as trusted (since the android UI does not
expose this property).

Turns out python scripting environment on android is full of fail (I
should have guessed), so then I wrote a shell version...

Then finally as I ran the script with the bluetooth address of the mac
mini and my eeepc I noticed that they are EXACTLY THE FREAKING SAME!?!

They are both CSR BlueCore4 (External firmware - nice) chipsets
(differing builds), but seriously WTF? I didn't think that Cambridge
Silicon Radio was that lame that they would reuse a bluetooth address
(broadcom sure - I've had a bunch of broadcom bluetooth dongles with
stupid addresses, like 00:00:00:00:00:00 or one that changed every
single time it was plugged in... yeah, pairing for the fail)... The
addresses are usually re-programmable, could the driver have set them to
a hard-coded value?

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Refactor DHCP code

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Register atexit handler to cleanup DHCP client

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Add .desktop entry for blue-tether on N9

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Track connection state & support automatic reconnecting

This now keeps track of the bluetooth PAN connection, starting the DHCP
client when it comes up and killing it when it goes down.

If a reconnect interval is specified with -r or in the config file, it
will automatically attempt to reconnect at that interval if the network
goes down. If no interval was specified it will terminate.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Fix reading reconnect value from config file

We weren't casting it to an int. I've tried to handle this in a generic
way that will allow other int options to automatically convert.

Not entirely sure if the convert_value function is stable - it's not
mentioned in the documentation, but it also isn't preceded by an
underscore.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
blue-tether: Prevent 'ALREADY DOWN' warning

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Remove desktop symlink

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Track Mac Mini .lircrc for MythTV

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
.lircrc: Tweak repeat delay on volume change

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
.lircrc: Replace right with M in navigate mode

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
Introduce git-am-tool

Every time I apply a patch in git that doesn't quite apply cleanly I
always end up doing a convoluted dance and more often than not mess
something up and have to start over.

This script is my attempt at streamlining this process - the idea is to
provide something like git mergetool, but for applying patches where we
don't know or have the version of the file that the patch originally
applied to.

For every file that git-apply fails to patch cleanly we open an editor
with the file on the left opened to where the first hunk was supposed to
go and the rejected hunks on the right. Once we have edited the file to
manually apply the failed hunks the file is added to the index and the
reject file is deleted.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>