Here are some fun things that I have worked on (hacked up in a few minutes) that I thought I should share. More serious projects I work on can be found here.
genBlog
(New: 2nd February 2007)
Feedback, please.
This is a perl script based on Mail::Box::Manager which given an mbox on stdin, will execute the command given as arguments once on each file. Kind of like xargs --max-args 1, but for mailboxes.
# mail.xargs sendmail < ~/INBOX
It could also be extended to handle maildir without too much effort, assuming Mail::Box::Manager supports maildir, but I haven't got that far yet.
For documentation, please run: perldoc mail.xargs
To produce a man page, please run: pod2man --section 1 mail.xargs > mail.xargs.1
mail.xargs
(New: 9th August 2006)
I recently started working on an Imlib2 loader for Nikon's NEF format as I want to play with the NEF files that my my D70 can produce. The loader implementation will probably used libtiff, and the code I have so far does that. However, I was having some trouble working out exactly what values are where in the TIFF, so I wrote a tiff directory decoder from scratch. Its some what limited, but it should be able to give you a directory listining given a TIFF. Well, an NEF from a D70 anyway.
tiff_find.c,
Makefile
(New: 27th April 2006)
Sort the human readable output of du -h, ls -h, etc...
# du -sh ~/lang/c/e/cvs/e17/* | sort-hr 16K /home/horms/lang/c/e/cvs/e17/CVS 116K /home/horms/lang/c/e/cvs/e17/oe 6.9M /home/horms/lang/c/e/cvs/e17/docs 14M /home/horms/lang/c/e/cvs/e17/proto 64M /home/horms/lang/c/e/cvs/e17/libs 81M /home/horms/lang/c/e/cvs/e17/apps
sort-hr
(New: 26th April 2006)
Update: 27th April 2006
I was concerned that the inital method, of expanding the reported sizes out
to an integer might overflow, so instead the unit is compared separately
to the value. The input parsing has also been made more robust.
Create a Debian root directory, suitable for use with NFS-root, using debootstrap. Actually, its probably useful for other things too. debootstrap is almost there, but not quite.
Note: This script doesn't work as well as I had first throught. I'm working on some fixes. So if you have some suggestions, please send them my way.
ndebootstrap
(New: 17th April 2006)
If you have a PSP (Play Station Portable) in Japanese, and you want to change it to English, and you don't read Japanese and thus can't read the menus, this page is for you. more...
New: 7th January 2006
Given a tar-ball, if there is a debian/ directory inside unpack the tar-ball and try to build a debian package from it.
Given a .dsc file (and associated tarball and possibly diff), try to unpack and build a debian package from it.
Download: dpkg-unpack-build
(New: 27th December 2005)
Query and Change the power states of outlets controlled by an APC PDU. It always toggles the first available outlet, Assuming that each user only having access to one outlet. I'm not sure if the other configurations are even possible.
# power-toggle 172.17.100.1 7 pass status STATE: ON # power-toggle 172.17.100.1 7 pass off Turning off... # power-toggle 172.17.100.1 7 pass off Already off... # power-toggle 172.17.100.1 7 pass reset Turning on... # power-toggle 172.17.100.1 7 pass reset Turning off... Sleeping for 10s... Turning on...
ccache is a compiler cache. I find it greatly reduces compile time when I have to recompile the same code over and over, which is often the case when I prepare Debian packages.
It can be invovked in a variety of ways. For me the easist is to make a symlink the name of the compiler in my path. For example, ~/local/bin is in my path before /usr/bin, and I want all invocations to gcc to use the compiler, so I do this
# which gcc /usr/bin/gcc # (cd ~/local/bin-ccache && ln -s /usr/bin/ccache gcc; ) # which gcc /home/horms/local/bin-ccache/gcc
So now, as long as ~/local/bin-ccache is in my path, whenever I invoke gcc it actually runs ccache, which does its magic and calls /usr/bin/gcc as needed. As ccache invocations look exactly the same as gcc invocations, this means its easy to get ccache into a build.
# which gcc /usr/bin/gcc # ccache-update-links ~/local/bin-ccache # which gcc /home/horms/local/bin-ccache/gcc
But with different versions of gcc, and recently doing some work with cross-compilers, I have a lot of symlinks I want to create, and this is a bit of a chore. So I wrote a ccache-update-links to do this for me. Note that it actually just creates and overwrites links, it doesn't know how to delete dead links. Perhaps I should add that...
By default it searches all the directories in the PATH environment variable, the list of paths to search can be overridden by setting SEARCH_PATH in the environment.
# which gcc /usr/bin/gcc # SEARCH_PATH=/usr/bin:"/usr/local/bin" ccache-update-links ~/local/bin-ccache # which gcc /home/horms/local/bin-ccache/gcc
Download: ccache-update-links
(Updated: 12th July 2005)
|
No New Messages |
New Messages |
9 Messages, 7 New | |
| New: |
[png] [xcf] |
[png] [xcf] |
[png] [xcf] |
| Original: |
[png] |
[png] |
[png] |
I've been thinking of writing a supplementry Japanese-English diectionary, basically for words I can't find in Edict.
So far I have an entry for "retranslation function", courtesy of Yuichi Yoshida, the uim-anthy author.
Works wonderfully with Gjiten, and should work equally well in anything that supports edict format dictionaries. Though it would be arguably more useful if it had more entries.
Download: saidict.utf8
If you need another format, iconv, pkf and friends can do that for you.
Updates:
Various updates, including an entry for 'H' (Echi).
17th January 2006
Saidict has expanded 100% from one word to two.
18th November 2005
Saidict is bing updated several times a month at the moment.
27th April 2006
18th November 2005
134 entries and counting...
30th January 2007
Added some Aussie slang, 146 entries in total and counting...
5th February 2007
When working with Git I sometimes make wrappers to help me out. The only one I am currently using is okiniri-export. Its here in case anyone finds it useful.
###### ####### # ####### ####### ####### ###### ### ### ### # # # # # # # # # ### ### ### # # # # # # # # # ### ### ### # # ##### # ##### # ##### # # # # # # # # # # # # # # # # # # # # # # # ### ### ### ###### ####### ####### ####### # ####### ###### ### ### ###
Patch for mutt 1.5.4:
mutt-1.5.4-strongbadsemail.exe.patch.txt
May or may not work with other versions of mutt.
Patch for mutt 1.5.5
mutt-1.5.5-strongbadsemail.exe.patch.txt
Includes .muttrc configuration option. Thanks to
Ben Buxton.
Does not seem to apply cleanly to 1.5.4.
Patch for mutt 1.3.28
mutt-1.3.28-strongbadsemail.exe.patch.txt
Backport of 1.5.5 patch above.
Binary packages for Debian Unstable with this patch here.
Kernel pants: Attempted to kill the idle task!
Patch for Linux 2.6.15:
linux-2.6.15.pants.patch
Patch for Linux 2.4.20:
linux-2.4.20.pants.patch
May or may not work with other versions of the Linux Kernel
"The sheer worthiness of this patch is beyond what words can describe..." Raster
"Probably the most significant advancement in the Linux Kernel since Linus got his 386 to boot." Me
See also Kfish's Pants Init Script.
If you know Kfish then you probably need this. Else you probably don't.
Kfishd Releases:
$ ps axf | fgrep kfishd 3032 ? SW 0:00 [kfishd swimming]
Japanese-English/English-Japanese dictionary for the Sharp Zaurus.
Some things to note about this code