last updated on 27 February 2016

Björn Rüffer/Björn's Blog

Snow Leopard Login window buttons for Restart, Shutdown, and Sleep

25 May 2011

In Snow Leopard (and probably older versions as well) you can disable the login window buttons for restarting or shutting down the computer. The following commands are pretty self explanatory:

sudo defaults write /Library/Preferences/ RestartDisabled -bool true

sudo defaults write /Library/Preferences/ ShutDownDisabled -bool false

sudo defaults write /Library/Preferences/ SleepDisabled -bool true

This will disable the sleep and restart buttons and enable the shutdown button.

Read more.

Changing page numbers in PDF files

13 January 2011

Changing the page numbering of existing PDF files with the usual unix command line tools is seemingly not so straight forward. Reading the manual, I thought that pdftk should be up to the job, but did have no success making it work on my PDF file in question. As the issue of renumbering pages in PDF files came up already a few times for me, I decided to give it a go and tackle the problem and invest a little more labour. I have found two working approaches.

Approach one: pdfoffset, a command-line tool written in Clojure,... Read more.

A simple example of a SWING GUI with clojure.

28 December 2010

Writing Java code is pain if you know how simple things can be in lisp. Clojure is a lisp dialect for the Java Virtual Machine and it can be used to do everything that Java would normally be used for.

Writing platform portable user interfaces is a pain, too, and Java seems to be one of the canonical choices for this task. Of course there are other choices like QT, wxwindows, Tcl/Tk, and so forth. However, except for QT these frameworks have a strange look and feel and some require platform dependent machine code. So back to Java. What... Read more.

Björn Rüffer — Copyright © 2009–2016 —