Some weeks ago I had to run a simulation for my research which has been very elaborate and involved externally invoked scripts on remote machines (so-called Wuchtbrummen). These external calls were dispatched by a central main script, that was running on my local PC. To avoid a complete SSH session setup and teardown every time a new call should be invoked on a Wuchtbrumme, I wanted to have a persistent SSH connection, where all subsequent commands can be tunneled through.
Yesterday I wanted to start using the Eclipse extension PyDev, because I was tired of using the pdb module. Even more sophisticated debugging modules like pudb did not satisfy my need for intuitive and comfortable python debugging. Even though I heard of the PyDev extension quite a while ago, I never gave it a try, as I was reluctant using the Eclipse Framework for Python.
Just want to note, that the previous post about solving Matlab crashes whenever a ﬁgure or plot command is called after a Mac OS X Java update has an update by Mathworks itself. Check this link and learn how to solve the problem also for older Mac OS X versions!
You might have noticed, I made this site a bit cleaner and added the possibility for you to support nesono.com a bit by ﬂattr. The search ﬁeld is now in the header and the right sidebar is completely gone. Just in case you’ve been searching for it… ;)
I recently updated the shell add-on for OS X, that overloads rm to not remove the items, but move them into trash instead. Before the update, a for loop moved every single item given in the command line into trash using one osascript (Apple Script) call per item. This caused a blocking shell with one ‘ﬂupp’ sound eﬀect for each moved item, which can be quite tedious, when removing many items, even if they are small. Now, after the update, a item list is created and ﬁlled with all given items to remove and in the end passed to one osascript call.
As I always forget the exact syntax and am too chicken-hearted to fool around, I note down the command to add one’s public key to the authorized keys on the remote machine (to login using pub/private key pair only) here. Use the following command (id_rsa.pub might be id_dsa.pub on your site).
cat ~/.ssh/id_rsa.pub | ssh email@example.com "cat - >> ~/.ssh/authorized_keys"
To parse a gzipped xml ﬁle using the minidom parser in Python, one has two options: Either hand over the ﬁle object pointing to the xml ﬁle or hand over the full content as a string. As I thought it would be the more powerful variant in terms of eﬃciency, I chose to use the ﬁle object, given by gzip.open(). This works for the SAX parser, but fails for the minidom parser somehow. This is for sure a bug, but it persists over many versions and many operating systems (tried Linux and Mac).
I just ﬁgured out once more, that vim works as expected. If you need to insert the output (e. g., stdout) from a command into the open buﬀer, e. g. to insert a certain type of ﬁles into something like .gitignore, svn::ignore, .cvsignore, you can simply type
:r !ls *.aux
In command mode and the text will be inserted at the cursor position.
Even though the title seems to exaggerate slightly, I need to say, that the 33 minutes OS X Lion claims to need for installation - and it does not correct itself by measuring the time - can never be reached with hard drives, at least not for an upgrade. For my ﬁrst installation, I was waiting for 75 minutes and the second installation tells me that 28 minutes are left (after 40 ‘real’ minutes).
It’s a bit tricky, but today I ﬁxed a small problem of an obsolete shortcut in OS X Lion. I used to have Cmd-Right on Exposé and Cmd-Middle on Spaces, to have both functions short at hand. After I upgraded to Lion from Snow Leopard, Spaces and Exposé are merged into Mission Control, which was a wise decision, but my mouse shortcuts were migrated BOTH to Mission Control.