1. nokogiri again, but not its fault this time

    Today it was a total waste of time as I was trying to figure out why the F* nokogiri was not getting installed into my new project gemset. First thing I had to figure out, was that Nokogiri now ships with libxml2 and libxslt that get compiled and installed with the gem itself. Second thing was that libxslt was not getting compiled because it could not find an “acceptable grep”! Go figure! After many trials and unfruitful google searches I decided to try with a different user and that maybe, if google was not returning any useful result, it was my configuration that was weird. It turned out that I was correct and the problem was related to my GREP_OPTIONS. I had the following in my .zshrc

    export GREP_OPTIONS="--exclude-dir=.svn --exclude-dir=.git -nR --color"
    
    and, after removing the -nR options, I was finally able to install nokogiri correctly. …


  2. moving to Octopress

    I’ve been delaying this migrations for ages now but here we are, it finally happened: I can write a blog post with my favourite editor now (Vim) and publish it to the web like a pro on my favourite dev website (GitHub) using git… that’s too many emotions for one single day :P …


  3. mod_rpaf and ubuntu 12.04

    Canonical, seriously, what's wrong with you people? How dare you calling the 12.04 a LTS version? Have you testend on EC2? and cloud-init? It's a bloody mess!


  4. send headers with Selenium and PHPUnit?

    Just dont waste your life and use curl if you need to do that. …


  5. perl: warning: Setting locale failed.

    Tired of this:

    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_CTYPE = "en_GB.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    
    Do this:
    export LANGUAGE=en_US.UTF-8
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8
    sudo locale-gen en_US.UTF-8
    sudo dpkg-reconfigure locales
    


  6. Ruby 1.9.3-p125 and RVM on Mac

    new ruby version is out and it’s time to upgrade! The first try gave me this error: …


  7. Nokogiri, RVM, Homebrew and headhache!!!

    Thanks to a gist (which I forked and slightly changed) I was able to finally install Nokogiri on my mac: …


  8. OpenVPN at startup in OSX

    The easiest way of getting an OpenVPN client on mac is with Tunnelblick but you will join the VPN only when you have logged in. Sometimes you need your mac to connect at startup instead and I’ll show you how to do it: …


  9. Exclude files and directories from Apache Auth

    It would have made sense to use LocationMatch with a negative lookahead regex pattern like “^/(?!admin)” but that doesnt work. Neither work a rule like !”^/admin” so here is a workaround:

    <Location "/">  
    AuthType Basic  
    AuthName "Restricted Files"  
    AuthUserFile /var/www/clients/client12/web17/passwd  
    AuthGroupFile /dev/null  
    Require valid-user  
    SetEnvIf Request_URI "^/(admin|skin|js|index)(.*)$" allow  
    SetEnvIf Request_URI "^/favicon.ico$" allow  
    Order allow,deny  
    Allow from env=allow  
    Satisfy Any  
    </Location>
    
    This basically allow the access without authentication to the directories/files that start with admin, skin, js or index. The other rule allow the favicon too. …


  10. VIM and the clipboard on Ubuntu

    If you want to copy and paste from Vim to the clipboard, install the package vim.gtk and enjoy the command “+y ! …