Monday, November 24, 2008

Path to l33thood

Again, just a random post, I think it's funny considering the examples at GNU/Fun
Here are 3 code snippets, all of them doing almost the same thing (parsing an argument string):

One year ago: http://ubuntu.pastebin.com/f29b96634
A week ago: http://ubuntu.pastebin.com/f2192e38b
and
Yesterday: http://ubuntu.pastebin.com/f1c3c0556

Also, in the first two examples, I use a function, evaluator_info(), that outputs help and version messages. So the code was a little longer because of the help information. In the third example, no such string is needed since 'optparse' automatically creates help messages based on the added options. Great!

Saturday, November 15, 2008

I picked a lock.. sort of :D

Just like the title says, this evening I managed to pick a lock... This probably doesn't have any informational value to you, however since it's a pretty neat achievement, I thought it would be best if I wrote it down here.
Using instructions found on the Internet (starting with http://en.wikipedia.org/wiki/Pin_tumbler_lock), I opened an old pin tumbler lock (an Yale lock). The procedure was simple, I just applied some pressure to the Tumbler, and then drove a needle in and out stroking the pins until the were correctly aligned. I didn't do any text-book lock-picking, meaning that I didn't tried to find out what pin was opposing, and then tried to push it down and then move on to the next one opposing, I pushed the pins randomly. Now you might think that it was a freak occurrence. However, the interesting part is that I managed to open the lock twice. Of course it could have been just luck :)
By the way, in the title I mentioned 'sort of', it's because normally I would have had to apply pressure using a flathead screwdriver, however, since I'm a newb at lock0picking, I cheated a little and pressed directly on the part that goes into the door, in a real lock-picking situation this would be impossible since it implies that the door is opened...
In any case, I didn't knew it was this easy, my next move will probably be to purchase a simpler lock (Yales are used on almost any outside door so they aren't the easiest locks to pick), and try to actually pick it, instead of relying on lady luck.