Monthly Archives: August 2011

Split flac file into tracks using a cuesheet

      1 Comment on Split flac file into tracks using a cuesheet

shnsplit (part of the “multi-purpose WAVE data processing and reporting utility” shntool package) provides a simple method to split flac files into individual tracks specified in a cuesheet. With the custom output format module, you can even transcode the tracks directly to another format, e.g. mp3, if your mobile music player doesn’t support flac. snippets.dzone.com provides an exemplary script for… Read more »

Specifying file encoding when writing dom Documents

Assumed, we got a fully parsed org.w3c.dom.Document: Just using LSSerializer‘s writeToString method without specifying any encoding will result in (rather impractical) UTF-16 encoded xml file per default will output Unfortunately, specifying an encoding isn’t trivial. Here are two solutions that don’t require any third party libraries: 1. Using org.w3c.dom.ls.LSOutput 2. Using javax.xml.transform.Transformer

Non-interactive ssh with expect

      1 Comment on Non-interactive ssh with expect

If you need a programmatic ssh login, i.e. in a shell script, the best way to make ssh non-interactive usually is a public-key authentication. This requires the public key to be stored on the host machine, which (admitted, in very rare cases) can be hard or impossible. One of those rare cases might be a chrooted environment on a webserver… Read more »