167 reputation
19
bio website arnau-sanchez.com/en
location Barcelona, Spain
age
visits member for 3 years, 6 months
seen Dec 21 at 14:33

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.


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
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
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
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
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
comment Use standard USB network device as Access Point
ok, then I guess there is no way. I had the hope that somehow we could use a device in ad-hoc mode as AP (I know, there is an infrastructure mode -master- for that).
Jul
7
comment Use standard USB network device as Access Point
added the model of the USB device on the question.
Jul
7
comment Use standard USB network device as Access Point
it's a USB WiFi device, not a router.
Jul
7
comment Use standard USB network device as Access Point
the interface supports managed and ad-hoc. That was the question, can I build something similar to an AP in ad-hoc mode?