Me, myself & I

Andrea Leofreddi's blog

A collection of random hacks and more  

  • Home
  • About

macOS: X cannot be opened because the developer cannot be verified

Lately I was installing the embedded ARM toolchain to compile some STM32 code, and I ran into this beautiful error: If you are a macOS user it's very probable that you have already

  • aleofreddi
1 min read

macOS & PL-2303

The Olimex USB-serial-cable - a 3.3v USB-to-serial adapter based on the PL2303XA chip - won't work out of the box on macOS. While there are various drivers out there in the wild,

  • aleofreddi
1 min read
Java

OpenJDK 9 & macOS: java.lang.UnsatisfiedLinkError: Library not loaded: @rpath/libfreetype.6.dylib

Some time ago I wrote a post on how to brew and manage multiple (Adopt)OpenJDK versions on your mac - which is my current java setup. Premised so, lately I wanted to

  • aleofreddi
2 min read
AWS

AWS Cognito: list of users

AWS Cognito is a great tool to chop-off authentication from your app, with a lot of bonuses when it comes to single sign on and integration with existing directories, but the web console

  • aleofreddi
1 min read

Generator remote start hack

DISCLAIMER Carbon monixide is very poisonous and can kill quickly! Under no circumstances I will be held responsible or liable in any way for any claims, damages, losses, death, expenses, costs or liabilities

  • aleofreddi
11 min read
macOSX

Manage multiple jdk versions on macOS

Using homebrew It's super easy to install any JDK version from the adoptopenjdk builds: Andreas-Mac-mini:installer a.leofreddi$ brew tap AdoptOpenJDK/openjdk ==> Tapping adoptopenjdk/openjdk Cloning into '/Users/a.leofreddi/Applications/

  • aleofreddi
1 min read
macOSX

Perl fails to compile XS modules on macOS Mojave

On Mojave, I ran into a situation while trying to install CryptX via CPAN: "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CryptX.bs blib/arch/auto/CryptX/CryptX.

  • aleofreddi
1 min read

Using Slf4j from C++ JNI

Lately I've been gluing some Java+Netty code with a C++ native library, and I wanted the native C++ code to use Java's logging too (in this case the ubiquitous slf4j framework). So,

  • aleofreddi
4 min read

Internet is a safe place

In the meantime... a.leofreddi@XXX's password: Last login: Thu Oct 13 17:26:12 UTC 2016 from YYY on pts/0 Last failed login: Sat Oct 29 12:23:42 UTC 2016

  • aleofreddi
1 min read

Scanner with mono document-feeder: how to scan double-sided documents?

I'm a happy owner of a Brother DCP-9020CDW which has a nice document-feeder feature, allowing you to automatically scan multi page documents (and perfectly integrated with macOSX). Unfortunately the feeder there is able

  • aleofreddi
1 min read
Unix

How to compress a PDF file on MacOSX (& Linux)

Often (and especially when scanning documents with my printer) from MacOSX I would get unreasonable huge PDFs which are not suitable for emails. To strip them down without pain one can use ghostprint:

  • aleofreddi
1 min read

Yubico Yubikey, CentOS/RHEL 7 and ssh

Today I wanted to setup ssh yubikey authentication for a CentOS 7 box, and I've lost more time that expected. Since I've found a lot of wrong documentation I'm posting below the correct

  • aleofreddi
1 min read

TimEL: a new streaming API

TimEL is a Java library specifically developed to evaluate time-series expressions using a user-friendly language. Check out the new version which comes a new streaming API allowing it to crunch very large amounts

  • aleofreddi
1 min read
Java

Jetty on RHEL 7/CentOS 7

If you look around on the internet you may find a lot of blogs guiding you on the installation of Jetty in RHEL 7 (or CentOS) which require you to download a new

  • aleofreddi
1 min read

cyberz.org is now vleo.net

Back in the 90s I used to hang out on irc, and there, for many years, I’ve used the cyberz nickname, hence cyberz.org. But life goes on and a lot of

  • aleofreddi
1 min read

SELinux: how to change default context of a directory

Sometimes you may want to override the default SELinux context for a given path. This can be easily accomplished editing /etc/selinux/targeted/contexts/files/file_contexts.local adding an entry (which is

  • aleofreddi
1 min read

WebLogic 12c: very slow domain creation

While creating a new domain on Linux, your Weblogic gets stuck at the following message? <BEA-141254> <Generating new domain directory in XXX> Try passing the -Djava.security.egd=file:

  • aleofreddi
1 min read

Resuming an scp transfer

Did it ever happen to you that while you're scp'ing a huge file the connection drops and you have to start all over again? There are big chances that you know I'm talking

  • aleofreddi
1 min read

How to expand a ZFS device

Nowadays virtual environment are very common, thus a hot increase of an existing drive into a virtual machine is a very common operation (roughly equivalent to a LUN expansion in SAN). When you

  • aleofreddi
1 min read

SMF Manifest for Oracle 12c DBMS on Solaris 11.1

Here’s the procedure for adding Oracle 12c DBMS as SMF service in Solaris 11.1, based on this guide. The version provided here is slightly modified for the sake of simplicity as

  • aleofreddi
1 min read

Integrating Oracle and MySQL with Bacula

After putting your precious data into your preferred database (Oracle or MySQL if you’re here) your next worry should be how to back them up. Here Bacula comes to help as a

  • aleofreddi
1 min read

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

  • aleofreddi
1 min read

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

  • aleofreddi
1 min read

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

  • aleofreddi
1 min read

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

  • aleofreddi
4 min read

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:

  • aleofreddi
1 min read

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

  • aleofreddi
1 min read

I²C 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

  • aleofreddi
3 min read

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

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

  • aleofreddi
1 min read

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

Some time ago I had a need to display some vectorial drawings on the web so I've found out that SVG is decently supported by modern browsers (I won’t say anything about

  • aleofreddi
1 min read

Bode and Nyquist diagrams using GNU Octave

Using GNU Octave is easy to plot Bode and Nyquist diagrams, as follows: bode(zp([], [-1*i, i, -1], 1)) nyquist(zp([-0.5], [0.0, -0.2, -4], 1))

  • aleofreddi
1 min read
Backup

Bacula mail changer script (aka poor man's autoloader)

I enjoy Bacula for automated home backups on DLT and DDS tape drives. Being used at home there’s no – obviously – big-dollar-company-manager to ask for an autoloader; and when the time of a

  • aleofreddi
2 min read
Electronics

Some applications using I²C

Parallel and serial ports are disappearing from today’s pc making life harder for the people who wants to connect their home-made devices to a pc. Some time ago I was considering USB,

  • aleofreddi
4 min read
Linux

Nagios nrpe and sudo: "NRPE: Unable to read output"

On CentOS 5 (and RedHat EL as well), you can encounter the following behaviour when configuring an nrpe plugin with sudo: [andrea@feyd ~]$ /usr/lib/nagios/plugins/check_nrpe -H 1.2.3.

  • aleofreddi
1 min read
Linux

Using samba with autofs on Fedora 9

Mount a samba share on the fly without having it mounted statically at boot via the /etc/fstab file can bring you the advantage of a painless boot in case of unavailability of

  • aleofreddi
1 min read
Delirium

Bash delirium (delirio in bash)

f1() { :; }; f0() { f$((${#1}==0)) "${1:1}"; echo -n "${1:0:1}"; }; f0 'dlrow olleh'; echo

  • aleofreddi
1 min read
Amarok

MusicBrainz not working with Amarok on Fedora 8

On my Fedora 8 system with Amarok I was trying to fill an mp3’s tag header using MusicBrainz, getting the following error: Tunepimp (MusicBrainz tagging library) returned the following error: "Fingerprinting

  • aleofreddi
1 min read
Linux

SSH X11 forwarding issue

Recently I’ve been in an awkward situation with ssh and X11 forwarding, where ssh using the classic -Y or -X option wasn’t working (DISPLAY was not set): [andrea@duncan ~]$ ssh -Y

  • aleofreddi
1 min read
sata

Solaris 10 si3124 backport (workaround for bug #6566207)

Do you think you can get a fast cheap SATA mass storage at home with Solaris 10 and ZFS just plugging a cheap si3124 controller? Not so easily: on Solaris 10 you will

  • aleofreddi
2 min read
Solaris

seq equivalent

On platforms without seq (MacOSX, Solaris), you can emulate it using dc as follows (note the upper bound and the lower bound): echo '[1+pdUPPER_BOUND>aq]saLOWER_BOUND 1-lax' | dc

  • aleofreddi
1 min read
All/News

Last of the Mohicans

After years of heroic resistance my site finally became a blog.

  • aleofreddi
1 min read

NNet: a metaprogrammed C++ neural network

NNet is a (metaprogrammed) neural network. It allows the selection of the network layout (number of layers and activation functions) in a simple way, without runtime costs -- check out the following 2

  • aleofreddi
1 min read

Controlling the HP NetServer 5/133 LS2 LCD

Some time ago I got an old HP NetServer 5/133 LS2 (that I revived with FreeBSD). After giving some progress during the boot process, the front LCD display gets stuck with a

  • aleofreddi
4 min read
Andrea Leofreddi's Blog © 2023
Latest Posts Ghost