There is a bug in the integration between Emacs’ EasyPG and the “new” GnuPG2 that causes Emacs to not load
.gpg files when running in a text terminal. It’s being worked on, apparently, but in the mean-time, here is how to fix it.
NetBeans 6.5 is out! You can run it with the Nimbus look and feel too! There’s also an Early Access plugin for Python. All very nice.
I recently had occasion to play with some Python at work (a small script to do some configurations, and I didn’t want to do them in bash), so I took the time to get all of this set up. It’s all so very easy and not worth writing about. However I thought that the interactive debugger (which is awesome, btw) has a small issue that needs resolving. Mean-time, here’s a work-around.
I have a bunch of free Ogg Vorbis audio files that I’ve downloaded from Kahvi.org. They’re great! But recently they’ve been including cover art within the files, which breaks Windows Media Player (it can’t handle the very long tags of binhex-coded JPGs).
Since I rather like WMP’s integration in windows (keyboard shortcuts), and Amarok isn’t quite ready for win32, I thought I’d find a way to strip the troublesome tags from the data files rather than change to another player.
Here’s a quick-and-dirty shell hack to remove the tags from the files and get them playable by daft players such as Windows Media Player
Did you ever get a stream of XML out of a log file, or in a data stream, and it’s all mashed together without line-breaks so that it just appears as gobble-de-gook? If there’s a data error (not an XML parsing error) then you have to read it so that you can find where the error is, but you don’t have XML-spy and NetBeans is overkill or takes forever to fire up…
Emacs to the rescue! Benjamin Ferrari wrote this increadibly useful (and simple) elisp function to pretty-print a block of XML code:
This post is also available at my personal web site: http://milosophical.me/blog/2007/03/09/finding-dlls-used-by-a-cygwin-program.html
I don’t know how many other people get this issue, but it comes up at my work a bit: Some co-worker asks me if I know of a tool to do such-and-such, and invariably I think “well, that’s easy to do on Unix, but on Windows…”.
Then I remember Cygwin, and quickly find a Cygwin utility that does it, or can be scripted to do it with a small amount of work. So then co-worker asks if they can have a copy of this utility, and of course Cygwin is Free, so I say “sure, go download from www.cygwin.com.” Then they say, “yeah, but I don’t want to install all of Cygwin, can’t you just give me that one program?”
Well, the Cygwin command-line tools can be run from a Windows
CMD.EXE shell, so this is quite possible to do. However, they all require the Cygwin POSIX layer, which at a minimum means I should also give them
cygwin1.dll. But what other DLLs might the program use?
MJL2008-09-10T14:37+1000 Update: since this page gets a lot of hits, here’s the quick answer: use cygcheck, i.e:
Find it under Happy hacker discovery #2. Keep reading if you’re bored…
This post is also available at my personal web site: http://milosophical.me/blog/2007/03/09/setting-up-multiple-java-vms-under-cygwin.html
It is useful to have different versions of the JVM installed, for a number of reasons:
- Different optimisation features from different JVM implementations
- Different language features from different JVM versions
- Java classes compiled with “Tiger” won’t run in “Mantis”…
It is also useful to be able to quickly switch between installed JREs/JDKs depending on the task at hand.
If I’m hacking in Linux, the JPackage project provides a much nicer solution to this problem, and the Linux distro’ I’m using (SUSE 10.0) uses JPackage. It’d be nice if there was an
update-alternatives for Cygwin, but since there isn’t I’ve come up with this hack.
This post is also available at my personal web site: http://milosophical.me/blog/2006/06/23/monospace-fonts.html
I finally got fed up enough with Courier New to start searching for a legible, monospace font to use in jEdit. In Emacs, I’m particularly fond of the standard X font “misc-fixed” (though it’s a little tough to tell appart O and 0 still). But for jEdit, the Java monospace font seems to map to Courier New in Windows, and to some God-awful font on Linux.