Daniele Esposti's Blog

Vim

New year, new programming languages, new technologies and new IDE. I finally switched to Vim as a primary editor for Python, JavaScript, HTML and CSS. The learning curve of Vim is not so steep as you think, the main roadblock is not the editor itself but the correct configuration of...


Git-rebase no jutsu

In a DVCS rebasing is the action performed by re-applying all the commits done on the current active branch since it diverged from a remote branch. That is, all the commits are taken away and re-applied over the latest version of the remote branch. This will rewrite the history of...


Restore MySQL database with progress bar

Restoring a copy of a medium/big database can be a boring task, it can be worse when the process takes some times (let’s say more than 10 minutes) and you don’t have any idea of the state of the restore process and/or it’s ETA. On Unix you can monitor the...


Simple hardening of the Python interpreter

For companies protecting their source code form reverse engineering is between very to vitally important. Using languages based on virtual machines easily expose the bytecode to simple un-compile techniques which revert the op-codes back to human readable code. One solution involves obfuscating the source code but with Python this is...


How to NOT write an exception handler

Exception handlers are important but more important is to code them in the correct way. Today I’ll show you an example of how to NOT write an exception handler. This example is taken from a real piece of code I found laying around in the code base, so “True story...