Author Archives: admin

Recovering deleted files with SleuthKit

      No Comments on Recovering deleted files with SleuthKit

SleuthKit is probably one of the most comprehensive collections of tools for forensic filesystem analysis. One of the most basic use-cases is the recovery of files that have been deleted. However, SleuthKit can do much, much more. Have a look at the case studies wiki page for an impression. Let’s assume, there is a FAT volume on our disk (maybe… Read more »

How to find multiple patterns with GNU findutils

Actually, searching for multiple patterns should be a trivial task. Find provides a -o operator (and many others) that lets you combine multiple expressions. A simple Example: You want to find all files in the current directory whose filename extension are either .c or .h This is not limited to the -name test but can be combined with any other… Read more »

Hack: How to disable recently used items list

      7 Comments on Hack: How to disable recently used items list

Quite a few applications use ~/.local/share/recently-used.xbel to keep track of a user’s most recent files. Unfortunately, not every application offers customization options to disable this list. One possible solution, granted, a quite hacky one, is to clear recently-used.xbel and revoke a user’s permission to edit it again. First, remove and re-create the file to clear it You can then edit… Read more »

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 »

Escaping WordPress shortcodes

      No Comments on Escaping WordPress shortcodes

With WordPress 2.5 came the WordPress shortcodes, a simple set of functions to create macros to be used in WordPress posts. Quite a few plugins were developed subsequently to enable escaping of those shortcodes. This is necessary because the shortcode parser, as it tries to interprete everything between square brackets, makes it impossible to include a non-interpreted shortcode such as… Read more »

Typesetting formuals with MathJax

      No Comments on Typesetting formuals with MathJax

Most hosting providers don’t have LaTeX packages installed on their servers and installing LaTeX yourself is usually only possible on rootservers, which are quite a bit more expensive (and therefore much less common) than regular hosting plans. However, there is a great project called MathJax, that enables you to display formulas directly inside your wordpress posts without the need to… Read more »