Latest posts

Proyectos para coger energía

Print your own robot

http://www.bbc.com/news/technology-17614392

I’ve seen the possibities of a free robots and free 3d printers. Mixing both looks like the perfect match!

Going to space the hacker way

http://www.copenhagensuborbitals.com/

Two people building their own spaceship. It must be cheap, open source, simple and beautiful. And the best part, they are making it happen! I would call this the hacker way of doing things. I just love the idea, the philosophy and the results :).

Conexión Guifi Orduña Antigua: 2 kilometros con dos nanostation M5

Esta entrada fue publicada desde La Antigua! Gracias a Alioune por su inestimable colaboración :)

Reason 38 in Network Manager @ Ubuntu 10.04

Today I witnessed some weird behaviours in Ubuntu Lucid’s network-manager (0.8-0ubuntu3.2). All my wired connections have disappeared and have been replaced by this:

This comes together with some weird errors in the daemon.log:

NetworkManager: (eth0): device state change: 7 -> 3 (reason 38)
NetworkManager: (eth0): deactivating device (reason: 38).
NetworkManager: (eth0): canceled DHCP transaction, dhcp client pid 3721

NetworkManager: user_connection_get_settings_cb(): Couldn't retrieve connection settings: Method "GetSettings" with signature "" on interface "org.freedesktop.NetworkManagerSettings.Connection" doesn't exist#012.

user_connection_updated_cb: assertion `old_connection != NULL' failed

After searching in Google in vain, I decided that I must have broken it somehow. Maybe importing the old connections from another Ubuntu (I guess exporting and importing gconf’s XML is a high-risk operation). Well, the workaround is:

  • Check the system’s Network Manager configuration: in my case my MAC was kind of blacklisted: /etc/NetworkManager/nm-system-settings.conf

  • #no-auto-default=00:21:cc:6f:74:51,

  • Add a new connection “for all users”. This way the connection is stored in /etc instead of in gconf.
  • It’s not the perfect solution but it works :)

    Bundler weird error: No such file or directory – git cat-file

    This morning I woke up to this error while trying to update a gem version:

    bundle
     
    /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:579:in ``': No such file or directory - git cat-file -e c648d229fa981c5f9bcbd8ac6baa520582c248c6 (Errno::ENOENT)
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:579:in `git'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:677:in `block in has_revision_cached?'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:703:in `chdir'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:703:in `in_cache'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:677:in `has_revision_cached?'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:645:in `cache'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/source.rb:551:in `specs'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/definition.rb:147:in `block in resolve'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/definition.rb:145:in `each'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/definition.rb:145:in `resolve'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/definition.rb:85:in `resolve_remotely!'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/installer.rb:43:in `run'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/installer.rb:8:in `install'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/cli.rb:219:in `install'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
    	from /home/ignacio/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'

    After some wondering, I found out the origin of the problem: after installing Ubuntu 10.04 I hadn’t installed git :D. Certainly the error message could be improved. Now I just have to

    sudo aptitude install git-core

    How to improve a website speed when using xLanguage

    From time to time, we use xLanguage in WordPress. It’s simple and works well. We just found a small problem with the permalinks, forcing the client browser to redirect with every click on a page. For example, instead of “/lang/es/about-me” you have to go to “/lang/es/about-me/”. This does not make any sense, and it certainly makes websites slower.

    xLanguage modifies the WordPress link logic, so adding a slash after everything looks like a simple solution. Edit wp-content/plugins/xlanguage/xlanguage.php and in lines 928-930 add a slash (/) at the end. Like this:

    if (strpos($url, $pre) === 0) {
                    return untrailingslashit(substr($url, 0, strlen($pre)) . '/' . xLanguageTagPermalink . '/' . $lang . substr($url, strlen($pre))) . '/';
                } else return $url;

    Of course, there is a lot more to do to improve a website response. You should:

    • Use gzip in Apache (mod_deflate)
    • Combine your CSS and JS
    • Make sure you load the CSS first
    • Use PHP caching (php-apc)
    • Use WordPress caching (something like wp-super-cache).

    Try this with Firebug or Chrome developer panel and you’ll see a huge difference!