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.args section just before of ...

March 20, 2009

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): ...

March 19, 2009

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 .

March 19, 2009

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

March 19, 2009

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. ...

March 18, 2009

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) ...

March 17, 2009

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. FF : checksum ff = ff – ((08+52+4d+59) & ff) AT Command Response: MY 7e 00 07 88 52 4d 59 00 00 00 7f 7E : API Frame 00 07 : Length 88 : AT Command Response API Identifier 52 : Frame id 4d 59 : MY (4d 59) (4d ⇒ M, 59 ⇒ Y) Get the 16-bit network address of the module. 00 : Status 0=OK 00 00 : MY value, 00 000 not set 7f : checksum ff = ff – ((08+52+4d+59) & ff) Explicit Addressing Zigbee Command Frame: 7E 00 1D 11 01 00 13 A2 00 40 3E 25 75 00 00 01 01 04 02 01 04 00 00 18 01 01 00 00 00 29 63 CE 9F 7E : Start frame 00 1D : Length (29 bytes) 11 : explicit addressing transmit 01 : Frame id 00 13 A2 00 40 3E 25 75 : 64 bit address 00 00 : 16 bit address 01 : source endpoint 01 : destination endpoint 04 02 : cluster id (temperature measurement cluster id/ Measurement and sensing functional domain) 01 04 : profile id (home automation profile) 00 : broadcast radius 00 : options 18 01 01 00 00 00 29 63 CE : payload 9F : checksum Let’s analyze the payload ...

March 12, 2009

The barrel roll

The barrel roll.

March 10, 2009

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. It looks way cooler with springs. It just uses repulsion between nodes and attraction between connected nodes. ...

March 9, 2009

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. Appearance ⇒ Editor Click on Theme Files ⇒ Templates ⇒ Single post (single.php) Change the class of the first div to be "narrowcolumn" instead of "widecolumn" That is, replace: <div id="content" class="widecolumn"> </pre> with ...

March 9, 2009