iss's blog

When You Can Not Paste Your Password into the Webform

Blog categories: 

Today I visited one of these web pages that try to increase your security by prohibiting pasting the password from the clipboard. As I use a password generator and like to have large passwords, typing the password by hand three times was no option for me. I searched the web for a solution and found nothing. Maybe I was just asking the wrong questions, but I don't mind. Here's my solution.

Reusing Persistent SSH Connections for Performance Reasons

Blog categories: 

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.

Eclipse with PyDev under OS X Lion

Blog categories: 

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.

Site Clean-Up

Blog categories: 

You might have noticed, I made this site a bit cleaner and added the possibility for you to support nesono.com a bit by flattr. The search field is now in the header and the right sidebar is completely gone. Just in case you've been searching for it... ;)

Cheers, iss

rm2trash for OS X update

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 'flupp' sound effect 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 filled with all given items to remove and in the end passed to one osascript call.

start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

This is another remind me blog entry: If you suffer from above message, then you are probably using Ubuntu under a virtual host. If so, you will need to modify initctl to simply return true using the following steps. First, you need to tell dpkg, that you are going to change the upstart package installation using:

sudo dpkg-divert --local --rename --add /sbin/initctl

Then, you need to create a dummy initctl as a link to true:

Add SSH Public Key With One Command

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 user@site.com "cat - >> ~/.ssh/authorized_keys"

That's it,
iss

Python minidom parse xml.gz File

Blog categories: 

To parse a gzipped xml file using the minidom parser in Python, one has two options: Either hand over the file object pointing to the xml file or hand over the full content as a string. As I thought it would be the more powerful variant in terms of efficiency, I chose to use the file 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).

Pages

Subscribe to RSS - iss's blog