When creating a command line tool, you quickly are faced with the burden of handling command line arguments (parsing options, arguments, flags, etc). In Python, the optparse module or, its newer version, the argparse module are very nice solutions to build powerful command line interfaces, completely with automatically generated help …
-
-
List of available git commands
Git comes with a massive bunch of (sub)commands and even if you're dealing with git on a daily basis, you might not always remember every single one you need along the way. Having bash completion for git is already a good start (type
git
, a space and then tab … -
Slow down Charlie Parker with SoX
For the saxophone music classes I'm taking, I have some exercises to play along with Charlie Parker records. Because that Bird plays pretty fast, it helps to slow things down a bit. I started with manually slowing down the tempo with Audacity, but soon I couldn't suppress the itch to …
-
PHP lint checking multiple files in parallel
When programming, lint checking your source code can be useful to detect low level issues like syntax errors, undefined or unused variables. The PHP command line interpreter has an option
-l
/--syntax-check
to do a syntax check of the provided PHP file, instead of executing it:$ php -l file_with …
-
Running 32 bit executables on a 64 bit machine (Ubuntu Linux)
I recently had this strange problem with running a 32 bit executable on a 64 bit machine. It executed just fine on 32 bit machines and some other 64 bit machine. But on this particular machine I got the strange error message:
bash: some32bitexecutable: No such file or directory
which …
-
Slides of my public PhD defense
I finally found some time to upload the slides of my public PhD defense to SlideShare. It's all in Dutch, but if that's Chinese to you, you still can watch a lot of pretty pictures.
I already tried to upload my slides more than a year ago, but slideshare had …
-
Indentation with spaces and the tab key in Eclipse (3.5 aka Galileo)
Indentation with spaces and the tab key in Eclipse. I've pulled quite some hair on this one and now that I found the solution, I decided to write it down, so I don't have to loose my precious hair anymore.
Everybody has its own preferences, but I like 2 space …
-
Keyboard shortcut for code completion in Eclipse on Mac OS X
Finally! I found how to get the keyboard shortcut for code completion working in Eclipse on Mac OS X. At work, on Linux, I use CTRL-SPACE all the time in Eclipse. Unfortunately that did not work on my MacBook: CMD-SPACE triggers the spotlight search widget and CTRL-SPACE is tied to …
-
Gearman (job queue manager) command line tool: routing the workload to the worker process arguments with xargs
Abstract
Gearman provides a basic command line tool that helps to distribute work from clients to worker processes/machines. By default the worker process can only receive data from its standard input. With the
xargs
tool we can circumvent this and route data to the process arguments of the worker … -
PDF to PostScript conversion: pdf2ps versus pdftops
Occasionally, I have to convert a PDF file to Postscript (e.g. for subsequent processing with some PostScript utility). In the Linux/command line area, I know two options: pdf2ps and pdftops. I also know that one of the two is wonky and the other is better. But because their …