Search This Blog


Monday, November 24, 2014

D3 inspiration

Of course the main entry point for inspiration is D3.js website and Mike Bostock's examples page. Another great resource is Jason Davie's website.

Sunday, November 16, 2014

Proxy via SSH in OS X

Let's say you need to access a URL with your, but that URL is only accessible from inside a network. If your are working remotely, this will allow you to access the URL using an SSH dynamic port forwarding.
  1. First, you need connect to your network via ssh, using dynamic port forwarding. For example
    ssh -D <PORT> [usernname@]host
  2. With the SSH connection in place, go to your mac's network settings (in System Preferences). Click on Advanced ... and select the Proxies tab. Check the SOCKS proxy protocol and in its configuration set localhost as your SOCKS Proxy Server and <PORT> as the SOCKS Proxy Server Port.
  3. That's it. Now you can browse de web normally, but remote resources will assume you are inside your work's network.

Wednesday, November 12, 2014

Thursday, October 30, 2014

Installing Numba in OS X 10.10

$ brew install llvm33 --rtti
$ git clone
$ cd llvmpy
$ LLVM_CONFIG_PATH=/usr/local/lib/llvm-3.3/bin/llvm-config python install
$ python -c "import llvm; llvm.test()"
$ pip install numba

Wednesday, October 22, 2014

Python coroutine based state machine

I needed a simple state machine in a project I'm working on. Doing some research I came across coroutines. This post won't even try to explain what coroutines are. Instead, it just shows a super simple example of a finite state machine using coroutine.

Thursday, October 9, 2014

Installing KPCLI on OS X

keepasscli (kpcli) setup

Notes on installing and configuring keepasscli (a.k.a. kpcli) on OS X 10.9 (Mavericks) and 10.10 (Yosemite)

date: May 2014

First, download kpcli.
Once downloaded, put it in its final location (e.g. ~/):

mv ~/Downloads/ ~/)

Make it executable:

chmod u+x

Install perl dependencies via cpan

sudo cpan Crypt::Rijndael
sudo cpan Sort::Naturally
sudo cpan Term::ShellUI
sudo cpan File::KeePass

In theory that should be it, but there’s a problem with Term::readline. To fix it follow the instructions here


For the Term::ReadLine::Gnu the previous link didn’t work for me when updating to OS X 10.10. Instead I followed these instructions

Other dependencies

To be able to copy to the clipboard inside kpcli (e.g. xu or xp), you will also need to install these

sudo cpan Clipboard
sudo cpan Capture::Tiny

Finally, you can make an alias to kpcli including the DB location for fast access. Add the following line to ~/.bash_profile

alias kp="/Users/myuser/ -kdb='/Users/myuser/mydb.kdbx'"

Thursday, June 19, 2014

Santiago, Chile

Great summary of Santiago: beautiful mountains, a BIG air pollution problem, lots of buildings ... and, of course, we are football fans.