Ruben Laguna's blog

Mar 20, 2009 - 1 minute read - dns dnscache dnschildren enable install mac macports port portfile webalizer

Warning: Invalid keyword 'DNSCache' (webalizer.conf) in MacPorts (Mac OS X)

If you installed webalizer via MacPorts in your Mac OS X you must know that it comes without dns support. That’s why you’re getting those Warning: Invalid keyword 'DNSCache' (webalizer.conf) Warning: Invalid keyword 'DNSChildren' (webalizer.conf) Warning: Invalid keyword 'DNSCache' (webalizer.conf) Warning: Invalid keyword 'DNSChildren' (webalizer.conf) To enable it , uninstall webalizer sudo port -d uninstall webalizer Edit the Portfile for webalizer vi /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/webalizer/Portfile to add an --enable-dns \ (note the ending backslash “") in the configure.

Mar 19, 2009 - 2 minute read - arduino compass electronics heading hmc6352 library microcontroller

Arduino Library for Hmc6352

As part of my Xbee sensor project, I created an object oriented API to access HMC6352 compass functionality and I decided to make it downloadable as an Hmc6352 Arduino Library. Just unzip the file in the $arduino_home/hardware/libraries/. At the end you should end with $arduino_home/hardware/libraries/Hmc6352. The library includes an example on how to use it (in File ⇒ Sketchbook ⇒ Examples ⇒ Library-Hmc6352 ⇒ Hmc6352. The example looks like this (also available as gist):

Mar 19, 2009 - 1 minute read - cyberduck mac macosx plugin quicksilver sftp

How to fix the cyberduck quicksilver plugin

If the CyberDuck plugin is not working for you, (you can’t right-arrow to see the bookmarks) make sure that you changed the default nicknames of the bookmarks. Probably if you open the Console you’ll find some “missing nickname” errors there. [March19] [March 19] 7:31:22 PM Quicksilver[6037] Error: No 'Nickname' key for favorite: I found the answer in this google group Can’t right-arrow into Cyberduck - Blacktree: Quicksilver | Google Groups .

Mar 19, 2009 - 1 minute read - flip4mac mac macosx media os player plugin quicktime radio windows x

Listen to radio online (in Mac OS X)

I want to listen to Sverige Radio P1 in Mac OS X. It seems that Windows Media Player and RealPlayer are the only supported options so I thought I couldn’t do it but then I found Flip4Mac WMV Player also known as Windows Media® Components for QuickTime, by Flip4Mac™ . After installing it and restarting Safari 4, I could listen to SR P1 with no problem. References: Flip4Mac WMV Player Play Windows Media files in your QuickTime Player Windows Media® Components for QuickTime

Mar 18, 2009 - 1 minute read - arduino ds1620 electronics library sensor temp temperature

DS1620 temperature sensor library for Arduino

I talked about the DS1620 in a previous post. Now I created a DS1620 library for Arduino that has a more object oriented interface. The library has to be unpacked in the $arduino_home/hardware/libraries directory. After unzipping the library you should end up with a $ARDUINO_HOME/hardware/libraries/ds1620 directory. The library contains an example that can be accessed through the File ⇒ Sketchbook ⇒ Examples ⇒ Library-ds1620 ⇒ ds1620. The example looks like this:

Mar 17, 2009 - 6 minute read - arduino cluster compass electronics heading library measure measurement temperature tilt xbee zcl zigbee

Arduino XBee sensor (temperature, tilt, compass, and ambient light)

I finally put together an Arduino Pro Mini, the XBee, the MMA7260Q, the HMC6352, the TEMT6000 and the DS1620. This is how it looks like on the prototyping board (ugly, I know) Hopefully it would look better when I move it to the PCB. But before doing that I need to get the battery power set up. (I’m waiting for a MAX756 DC-DC voltage regulator and CoilCraft inductors to arrive)

Mar 12, 2009 - 2 minute read - api at command electronics examples frame response xbee

Example of XBee API frames

Some examples of XBee API Frames. Modem status frame 7E 00 02 8A 06 6F 7E : API Frame 00 02 : Length 8A : Modem status 06 : Coordinator started 6F : checksum FF – ((8A +06) & FF) = 6F AT Command API Frame: MY 7e 00 04 08 52 4D 59 FF 7E : API Frame 00 02 : Length 08 : AT Command Frame id 52 : Frame id 4d 59 : MY (4d 59) (4d ⇒ M, 59 ⇒ Y) Get the 16-bit network address of the module.

Mar 9, 2009 - 10 minute read - algorithm based force graph java layout library netbeans prefuse topcomponent visual visualization visualizer

Force Directed Layout in NetBeans

I just came up with the idea of reproducing the GraphView demo I saw in prefuse by using the Netbeans Visual Library API. The GraphView demo uses a Force Directed Layout algorithm to dinamically position the nodes on the screen. It’s really fast and cool. Download prefuse and experiment with it by yourself. I wanted to achieve something similiar with the Visual Library and I succeed up to a point. The force based layout algorithm that I implemented is much simpler that the used in prefuse, so there is no spring-like movement.

Mar 9, 2009 - 1 minute read - column default get_sidebar kubrick narrow post sidebar single theme wide wordpress

How To Display Sidebar in Single Post in WordPress 1.5 / 2.0 / 2.7.x Default Kubrick Theme

I found this great tip How To Display Sidebar in Single Post in WordPress 1.5 / 2.0 Default Kubrick Theme. The only problem is that the code that you should add is not properly shown in the post. He just copied the xml code verbatim in the post without escaping it and the browser doesn’t display it properly. So I’m reproducing it here for your convenience. Go to the theme editor.