Skip to content

Recent Articles

16
Mar

Multi-lun autoloader with VMware ESXi 5.0 with Adaptec SCSI HBA

VMware ESXi 5 is not able to handle multi-lun devices by default, so many SCSI autoloaders are not supported as-is (as HP StorageWorks LTOs), showing only the tape drive or media changer but not both:

Read moreRead more

21
Feb

Proguard on MacOSX

While executing proguard (via maven2) on MacOSX Snow Leopard, I’ve got the following error:

[proguard] Error: Can't read [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/rt.jar] (No such file or directory)

That happens because the Java bundled with MacOSX doesn’t provide a standard library configuration, that is the rt.jar has been moved and renamed to classes.jar. To fix the issue simply symlink rt.jar to the corresponding classes.jar file:

localhost:~ root# cd /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/
localhost:lib root# ln -sf ../../Classes/classes.jar rt.jar

30
Jan

Solaris 11 Express: bind an iSCSI target to an IP

Lately I wanted to bring the advantages of ZFS (on Solaris 11 Express) to a Linux box using iSCSI. After following the Oracle guide, I’ve noticed an unexpected behaviour when discovering the iSCSI targets (from a CentOS host):

[root@zimbra ~]#  iscsiadm -m discovery -t sendtargets -p 192.168.64.10
192.168.64.10:3260,1 iqn.2011-01.org.cyberz:storage:mail
192.168.64.106:3260,1 iqn.2011-01.org.cyberz:storage:mail
...
[root@zimbra ~]#

That is, the iSCSI target was bound to all the avaible interfaces (including ip addresses of zones).

Read moreRead more

2
Jan

OpenWRT on TP-Link TL-WR743ND

TP-Link TL-WR743ND is the PoE brother of the common TL-WR741ND wireless router which is supported flawlessly by openwrt. Since I’ve got one WR743ND, I wanted to convert it into a useful OpenWRT router but I figured out that, unfortunately, the WR743ND is not supported by OpenWRT (at least officially). Given the similarity to the supported WR741ND, I’ve decided to hack it a bit to get it work with OpenWRT.

Read moreRead more

28
Nov

CadSoft Eagle and Fedora Linux x86_64

CadSoft’s Eagle (a well known CAD tool for designing PCBs) is not compatible as-is with Linux 64 bit. In my case, after a fresh Fedora 14 install, I was getting this error:


# sh eagle-lin-5.10.0.run
eagle-lin-5.10.0.run: /tmp/eagle-setup.3778/eagle-5.10.0/bin/eagle: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

To get the thing done it’s enough to install the proper 32 bit libraries. On Fedora use yum to update the openssl package and then install the needed packages:


# yum update openssl
# yum install glibc.i686 libXrender.i686 libXrandr.i686 libXcursor.i686 freetype.i686 fontconfig.i686 libXi.i686 libpng.i686 openssl.i686 crypto.i686 libjpeg-turbo.i686 libstdc++.i686

Eagle is compiled with openssl 0.9.8, Fedora 14 ships with openssl 1.0, so we need to cheat a bit with symlinks:


# ln -s /usr/lib/libssl.so.10 /usr/lib/libssl.so.0.9.8
# ln -s /lib/libcrypto.so.10 /lib/libcrypto.so.0.9.8

Now your system is ready to run the Eagle installer.

24
Jul

Solaris 10 x64 and Symbios SYM22801 (and other LSI SCSI controllers)

Today I’ve discovered that the very common Symbios 22801 (aka Symbios Logic 53c875) SCSI controller is (unexpectedly) failing to be recognized by Solaris 10 on x64 hardware. In fact I was in the middle of the upgrade of my home backup infrastructure from an old DLT 20/40 to a newer DLT 40/80 to be connected to a Symbios card inside my Solaris box. Unfortunately after the reboot, the new card was unseen.

Read moreRead more

19
Jun

I2C Anemometer: cheap wind data logger

Lately I’ve been wondering if a wind-generator could help me lower my electricity bill (since my home server burns continuously some hundred watts per hour) in my town, Ponzano Romano. So I came up to the idea that wind data logging is absolutely a must for any further reasoning about wind – that is I need an anemometer. On internet prices for those devices may vary, but I was unable to find anything below 150€ which I think is a bit too much for what is just an experiment for fun.

From the very interesting forum energeticaambiente a post pointed me to the electronic italian magazine “Nuova Elettronica” that posted the following (relatively cheap) anemometer kit:

Nuova Elettronica Anemometer kit lx1606

The kit is fine but is not meeting my requirements for data logging, that is I have the need of a constant wind speed recording into my server; since it’s possible to buy only the anemometer (without the logic board) I went that way.

Read moreRead more

25
May

CyberzOrg::Event library: typesafe event handling in C++

The following article is date back to Thu Dec 14 22:12:44 CET 2006

Event is a little library built on top of boost::signal and boost::mpl that allows the user to declare in a simple way an object that can emit events and allow connection of (type-safe) callbacks as event handler to them. Usage is pretty straightforward, as shown in test/hello.cc:

#include <iostream>
#include "event.h"

enum { HELLO /* event type */ };

using namespace CyberzOrg::Event;

struct HelloEmitter
 : Emitter<
  Event<HELLO, void (const std::string &)>
 >
{ };

void callback(const std::string &s) {
 std::cout << "Event HELLO: " << s << std::endl;
}

int main() {
 HelloEmitter hello;

 // preferred syntax (useful if event emitter has the event table depending on itself,
 // in such case getSignal method is not directly visible).
 getSignal<HELLO>(hello).connect(callback); // connect signal handler (callback)
 getSignal<HELLO>(hello)("hello world"); // fire signal

 // easy syntax
 hello.getSignal<HELLO>().connect(callback); // connect signal handler (callback)
 hello.getSignal<HELLO>()("hello world"); // fire signal
}

You can look at sources or download a tarball. Any feedback is well accepted.

22
May

Controlling the HP NetServer 5/133 LS2 LCD

The following article is dated back to Sat Dec 6 20:15:41 CET 2003

Some time ago, I got an old HP NetServer 5/133 LS2 (that I revived with FreeBSD):

HP Netserver 5/133 LS2

After giving some progress informations during the boot process, I noticed that the front LCD display gets stuck with useless informations when the system is up and running, as shown here:

HP NetServer 5/133 LS2 LCD Display

Since I wanted to put some meaningful text into the LCD, I started investigating around for a way to accomplish that.

Read moreRead more

8
Dec

SVGPan: a Javascript SVG (Viewer) Pan/Zoom/Drag library

Some time ago the need for a browser-compatible vectorial language pushed me to consider the SVG markup language (I won’t say anything about Internet Explorer – it’s just unsupported there). The language itself is great, but, as a beginner, I was so disappointed about the fact that on the Internet I couldn’t find ANY library ready to use for panning and zooming features that I had to write one from scratch.

The SVGPan library features:

  1. Panning (pan à la Google maps) (click on the white background and pan)
  2. Zooming (using the mouse wheel)
  3. Element dragging (click on a drawing element and drag it somewhere else)
  4. Combinations of the above like zooming while dragging

The resulting javascript library is published here, in the hope that someone can find it useful. The library itself is very small and easy to use; and it’s licensed under the BSD license. You can try a demo here

 

No SVG support at all!

 

Read moreRead more