The paradigm shift in the purest sense of the expression. The old paradigm makes way for new ones. And declarative is the new one. Well…, not new new … Read More
Symfony2 + PHPCR + Doctrine2 + Jackalope recipe
Lately I’ve followed some developments in the Symfony2 corner of the PHP community with great interest. One of the most enticing developments is the usage of a Content Repository as a backend for your CMS. There is some work being done on the Symfony CMF, combining Symfony2, Doctrine2, PHPCR and Jackalope into a set of tools for building CMS’es based on a Content Repository backend. I didn’t get anything of the CMF to run yet, so I decided to dive in to tying these separate techniques together myself, and get a little proof-of-concept working. Here’s the code, and here’s the recipe: Read More
Failure in a bash script usually means failure of the script
So, when you write a bash script that does a certain amount of tasks for you, but you don’t want the script to keep running after some command inside the script failed, simply add a line to the script. Read More
Apply low priority to low priority processes
My transmission client was hogging my machine. Then I realized I never really use process priorities for CPU and/or IO, which is actually a pretty bad thing, considering some processes just are there to get some job done, but don’t need priority at all. Then I realized I also never use it for backup and such, which could be a problem for the server I’m running the backup on. Read More
Automate sudo nano; something I should’ve done a loooong time ago
Remember those countless times you’ve edited a file with nano, didn’t notice that you weren’t root at the time, and carefully made your configuration changes and saved the file, only to find out that you weren’t root and you have no rights to modify the file? Read More
Password-less authentication SSH
I use this a lot, and you should too. It saves lots of time, but you should also be aware that password-less authentication (and it’s ease) imposes a security risk on your behalf. You should be very cautious when you’re connecting to the remote machines (whether they are testing, staging or production environments, in ascending order of danger) beacuse there is no longer a password threshold reminding you that you’re about to do something that you might not have intended for that machine. Nevertheless, it is a timesaver and it simplifies authentication to machines you’ll often connect to. Read More
Bash control structures have redirection too
I found out a useful thing today. You can redirect output of bash control structures as well. Typically useful for for loops, which would need a buffer of some kind otherwise to have it’s output sorted, for example.
Binding keyboard volume buttons to mixer control
Here’s how to bind your specific buttons (such as + and – controls for volume and the mute button) to controlling your mixer in openbox. Open your ~/.config/openbox/rc.xml in your favorite editor. Also open a terminal window. In the terminal window start xev to find out what keys you are pressing:
Read More
Raising windows in stead of opening new ones
This is a pretty useful utility script for EWMH-compliant window managers, such as openbox. Since I use my terminal a lot, I don’t want to get stuck with 500 terminal windows at the end of the day because of all the terminal shortcuts (W+T) I used. So, let’s add a modifier to the shortcut to open new ones, and use the following script to open the first you opened. Read More
NginX for Apache users
Since some time now, I’ve been using NginX as a local development web server. After numerous years of Apache, the configuration of NginX needs some getting used to, but in the end, it is a lot easier and more flexible. Here are a few mappings to get you started if you’re used to Apache.