Saturday, September 25, 2010

Keyboard is Faster

Do you know this guy that uses only VIM? Did he already told you he uses VIM because you can achieve everything using just the keyboard? No?

At the times I'm not at home/office, or at the times I want to watch the beautiful sunsets from my porch, I work using my laptop, instead of a regular PC. While I like the laptop keyboard far better than a regular keyboard, I hate the touch-pad. It's just not usable.

So whenever I work with my laptop, I get to learn some new keyboard shortcuts, since it is the only thing that keeps me sane.
Recently things got a lot better, since I started using the keyboard shortcuts provided by Google's products, especially GMail and Reader.

While GMail keyboard shortcuts requires you to turn them on via the settings, you get those for free in Reader. If you can't remember a shortcut, simply press "?", and you'll get a nice popup reminding you whatever there is you need to know.
What I like best in the combinations they chose, is that they remind me the shortcuts of UNIX utilities (yes, VIM included). I guess this was intended, and I'm thankful for that.

Thursday, September 9, 2010

So What's On Your Reading List

I had this post in my mind of quite some time, but couldn't find the time to write it. Good thing there are holidays.

Finding great people for hire is difficult. More than once an employer would be looking for people which are interested in what they do, and not just good at it. Such people would usually be more passionate at work, and work harder and better that others.

One technique not many employers are utilizing, is asking what's on the RSS reading list of the potential employee. Come to think about it, it's a great way to see what the person is passionate about.
It doesn't mean that if one goes to an interview at some company that does media streaming, should read media-streaming blogs. But if the person is going to be a programmer, and happens to be reading Coding Horror, that's a great plus.

A thing I like very much in my current workplace (M86 Security) is that we have a must-read reading list. That means that every team member receives an OPML file on the first day on the job that contains stuff that he must read on a daily basis.
This helps turning the team members into pro's, and will certainly help the company and our future careers.

Tuesday, September 7, 2010

Working With ToR In Python

I bet I'm not the first one who ever needed to write a script that downloads something via ToR.
Apparently, there isn't much information regarding how to request a new identity or how to use the ToR proxy in Python. So here's a gift from me to the world.

First, while not necessary, I always use a new ToR identity prior to download something through the ToR network. The code looks like:

import socket
def renewTorIdentity():
success = False
s = socket.socket()
s.connect(('localhost', 9051))
resp = s.recv(1024)
if resp.startswith('250'):
s.send("signal NEWNYM\r\n")
resp2 = s.recv(1024)
if resp.startswith('250'):
success = True
return success

That would work assuming "authentication" is set to none in the Vidalia control panel.
After having a new identity, downloading a file is really simple, as Vidalia comes bundled with privoxy configured on port 8118. Here's a sample code for downloading something:

import urllib2
url = "http://something-to-download"
proxy_support = urllib2.ProxyHandler({"http" : ""})
opener = urllib2.build_opener(proxy_support)
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
response =
That's it. Simple.

Wednesday, September 1, 2010

Blog Day 2010

After missing it last year, and in one day delay this year, I'm celebrating today the blog day.

So here is my list of recommended blogs, not ordered by any specific order:
  • Miguel De Icaza - While it is popular to hate MS technologies, I do think mono is a great thing and its founder a very smart person.
  • Paul Graham - The father of Y-Combinator. While not exactly a blog, this one is really interesting and insightful, especially to would-be entrepreneurs.
  • Doc's blog - Did it ever happen to you that you met someone with much to contribute to the world (in terms of blogging, but not only), that just didn't reach their potential (yet)? Well, I hope that this post will make Doc to publish more of his clever insights and musings.
  • Lessons Learned - Yet another must read for would-be entrepreneurs. Nothing I can add here.
  • ZuLL - Well, I can't deny the fact I'm part of the security industry in Israel, and Guy writes about interesting stuff.
Still, looking a bit back, it seems I removed more blogs from my reading list, than I added. I really hope I'll come across new and better ones this year, so I'll have novel things to recommend on next year.