157 reputation
19
bio website arnau-sanchez.com/en
location Barcelona, Spain
age
visits member for 3 years, 5 months
seen Oct 16 at 8:02

Freelance developer

I am a freelance developer (I do mainly Ruby on Rails websites for a living) with a special interest in free-software, GNU/Linux and programming languages (Python, Ruby, Javascript, Haskell, Erlang, Scala...). Check my website if you want to hire me:

http://www.arnau-sanchez.com/en

My free software projects

Some of the projects and scripts I've developed over the years:

http://code.google.com/p/tokland/wiki/Projects

Favorite programming quotes

This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.

Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. Let the data guide the programming.

Functional programming is like describing your problem to a mathematician. Imperative programming is like giving instructions to an idiot.

Controlling complexity is the essence of computer programming.


Sep
24
awarded  Autobiographer
Oct
7
awarded  Necromancer
May
24
comment Monitor /sys partition for changes
Mikel, I use inotifywait from inotify-tools. Can you try this in a laptop? inotifywait -m /sys/class/power_supply/BAT0/status. I get I don't get any event when this value changes (unplug/plug the battery).
May
23
comment Monitor /sys partition for changes
I think we can safely assume the OP was working from a shell and he wasn't talking about C functions. Anyway, currently it's still not working for me in /sys files (Linux 3.6.3), I only get OPEN/ACCESS events, but not changes made by the kernel.
Jan
12
awarded  Excavator
Jan
12
revised disable cd/dvd button on linux laptop (ubuntu)
fixed code blocks and sudo command
Jan
12
suggested suggested edit on disable cd/dvd button on linux laptop (ubuntu)
Jan
12
awarded  Commentator
Jan
12
comment disable cd/dvd button on linux laptop (ubuntu)
Note that sudo command > file won't work, you need something like echo 1 | sudo tee /proc/sys/dev/cdrom/lock.
May
27
awarded  Critic
May
26
revised Test if element is in array in bash
deleted 127 characters in body
May
26
awarded  Teacher
May
25
comment Test if element is in array in bash
note that if ! some_check then return 1 = some_check. So: isNotSet() { [[ ... ]] }. Check my solution below, you can do it in a simple check.
May
25
comment Test if element is in array in bash
Some posts about set -u: davidpashley.com/articles/writing-robust-shell-scripts.html, blog.hashbang0.com/2010/05/18/robust-bash-scripts-part-one, openews.net/2012/bash-script-to-write-robust.
May
25
revised Test if element is in array in bash
added 8 characters in body
May
25
comment Test if element is in array in bash
@DennisWilliamson: Ok, some people recommend it, but I think it would be nice to have a solution that works regardless the value of these flags.
May
25
answered Test if element is in array in bash
May
25
comment Test if element is in array in bash
${array[$test1]} is simple but has a problem: it won't work if you use set -u in your scripts (which is recommended), as you'd get "unbound variable".
Aug
10
comment Broken UTF-8 display in XFCE terminal after upgrade to 4.8
but if you rename the .config directory don't you lost all your old configuration?
Jul
7
awarded  Scholar