Skip to content

Enter Puppet top scope symbols with Emacs Abbrev mode

Puppet manages variables in different scopes. Global variables and all facts are defined in top scope. To make this explicit, these variables and facts should be accessed using the top scope notation. So in a Puppet manifest the hostname fact should for example be written as $::hostname. Here is a piece of Emacs code that automatically adds the double-colon namespace separator to variable and fact names.

Continue reading "Enter Puppet top scope symbols with Emacs Abbrev mode"

Problems with svndumpfilter

Subversion (SVN) is not really my favorite revision control system. I switched from CVS to Git many years ago and never looked back. Nevertheless I have to support a couple of SVN repositories for the developers at work. From time to time I get requests to copy directories between repositories while preserving the history. This is one of the things that is not directly supported by SVN itself.

Continue reading "Problems with svndumpfilter"

Visualize wait-for graph for Java threads

A Java Thread Dump is often used for analyzing scalability issues, hangs or deadlocks. It contains the stack trace for every thread and the locks/monitors a thread holds or waits for. Sometimes it may be useful to create a visual illustration of the dependencies between the blocked threads to be used for a document or a presentation. I would like to introduce a little perl script I wrote for this purpose.

Continue reading "Visualize wait-for graph for Java threads"