Wednesday, December 14, 2011

OS X logout from the command line

This morning I found my Mac desktop stuck on logout. I did not want to force reboot it so I did some peeking around for how to logout peacefully. Looks like it is very easy to do:

  1. ssh into the system from another Mac or linux machine
  2. sudo killall loginwindow

Sunday, December 4, 2011

Array permutation

Here is a snippet of Java code that will permute indexes of an array: For working Java class see https://github.com/sorokine/FischerKrause