Code Bits
I tend to write code, and sit and fiddle with things. Rather than let
the possibly interesting things I've done moulder on a hard disc forever,
until I eventually lose them, I'm going to put them out here.
This has two advantages:
- Search engines, and therefore other people will be able to
find and use them.
- I will be able to find them when I want them back.
I need to find out how to put something under GPL; at the moment I'm
not, and I'd like to. I don't want to have to make a big package out of
all these little quickies. I'd like to have single-file stuff possible.
Single files may have to be saved by right-clicking.
If this is useful to you as a developer, do me the favor of dropping
me a line.
The Bits
- Extracting Kyocera Sounds
- I wanted to get the ring tones off of my Kyocera 7135 Smartphone,
so I could use them on the new phone I finally had to get. I did so,
and here's how.
- Open Cygwin Shell Here
- A way to get a quick "Open Cygwin Shell Here" item in the right-click
menu for directories in the Windows Explorer, kind of like the widget
that adds "Command Prompt Here" from Tweak UI. Directions to install and
a twisty little batch file.
- SCUMM sound extractor
- SCUMM was the engine LucasArts games such as Sam & Max Hit The Road
and Day Of The Tentacle used to store and run the games from. This is a
utility (a perl script, of all things) that will break all the sound
resources out of one, and store them in individual files.
- chartab.c
- I did a little bit with allowing international characters to be typed
through a MU* server I have here. To see which characters were interesting,
I wrote this little quickie to print high-bit characters. I then kept
losing it and needing it, so it's here where I can find it.
- readch.c
- A friend of mine needed to be able to read keys from the shell
prompt, with a timeout. This dosen't do anything too sneaky, but does
use termios, so is Unix specific. Very simple, very brain-dead, and
solved his problem.
- TNT: Tee for NT
- Under Unix, you can run a command line program, and capture the
output. There's a handy tool called tee that will make a T connector in
your shell pipeline, and let you write the output to both a file for
later perusal, and let it continue outputting to either the screen, so
you can watch it, or to another program, so it can consume the output.
NT lacked any such tool, and I needed one. Here it is. This one
compiles either with Microsoft's Visual C, or under cygwin. Nifty!
- MUCK: simple log recovery tool
- I've been messing about with an online gaming server, called a MUCK.
The MUCK can record everything anyone does. Occasionally, it's nice to
recreate what everyone in a particular room did that was publically visible.
Here's a Perl script that will do just that, given the server logs.
It should work with Revar's Fuzzball, or my RF MUCK.
- Tool to build playlists from ogg
files.
- I've gotten a nice little audio player, the
Neuros and it can play
Ogg Vorbis files. The way my music is
sorted, playlists are extremely useful, and I don't usually maintain them.
This Perl script will make a .m3u file for all the oggs in a directory.
It's got a path to ogginfo hardcoded, so you'll have to update that.
If your browser has problems downloading the Perl version of this,
here's the same file as text file.
- List Unix Package Contents
- Unixes that use the pkgadd package files (Solaris, SCO, HP-UX) don't seem
to have a way to get a list of the files in a package. Here's a little
Perl script that will get the files out of the package. I know it works
on Solaris. It may work on the others.
- Fix Alt-Tab in KDE
- Alt-Tab in KDE only worked with left tab. I use right-alt-tab.
A comment on linux.com
(here)
mentioned how to fix it. A moment of googling figured out how to make
the
xmodmap -e "add mod1 = Alt_R"
permanent, by adding:
keycode 113 = Alt_R Meta_R
... to my .Xmodmap file.
Oddly, that didn't help. There is no difference in xmodmap -pke before
and after that command. To get KDE to do the right thing, add a shell
script with that xmodmap -e command to ~/.kde/env. Mine is called
fix-alt-right-tab.sh and works fine.
- Mounting LVM on MD RAID on SuSE 10.3
-
We have a server which uses a Linux MD software RAID to house a LVM volume.
Under RAID5 that worked fine, but we wanted to use RAID 6, and SuSE's tools
won't regognize it automatically.
To make it work, add the symlinks for boot.md and boot.lvm just before
boot.localfs, md first then lvm. Then run insserv to rewrite the dependncy
files so paralell init works.