JSON alerts for Munin

Sunday 2018-01-07

Munin is a great and easy way to monitor your servers. The documentation for Munin is kind of all over the place, and sometimes not all that clear.

  • There is the recent “Munin Guide” which is quite informative and well laid out.
  • Sometimes additional info and background can be found on the old munin wiki.

Getting the standard mail alerts working on munin is simplest, but as soon as you want custom layouts or send alerts as a push message to a phone, it can take quite some work. Here’s what I figured out to get the Munin alert available to you as JSON inside your own Python script so you can do anything you want with it.
Read the rest of this entry »

Advertisements

Make the ESP8266 talk 9600 baud

Monday 2017-01-02

Surprise videoThe default serial speed on the ESP8266 WiFi chip is 115200 baud. If you connect this chip to an Arduino and want to use SoftSerial to talk to it, it will not work. The SoftSerial library is limited to 9600 baud because of hardware limitations of the Arduino. If you want to talk to the ESP8266 with an Arduino at lower speeds, you need to tell the ESP8266 to slow down.

Read the rest of this entry »


macOS Sierra SSH “Permission Denied”

Saturday 2016-11-12

keychain-mac-tutoIf you used DSA keys to log in to your SSH server and have upgraded your client machine to macOS Sierra (or OSX Sierra if you like), you probably ran into this problem:

client$ ssh -p 8123 george@10.0.0.10 -i ~/.ssh/id_dsa 
Permission denied (publickey).

The answer to this problem is replacing the DSA key with an RSA key, but how do you do on the server when your only means for connecting is the OSX client machine you just upgraded? Here’s how:

Read the rest of this entry »


Designing a Fox-hunt antenna

Sunday 2016-06-19

3d radiation patternMany years ago, I used to do some radio fox hunting with cars. Usually these hunts are at night to make it more exciting, and can be great fun. As I got older I lost interest and moved on to other things. But last year, I decided to have a go at a popular balloon fox hunt on 144MHz. This is quite a large scale and professionally organized fox hunt by Dutch Radio Amateurs. Read the rest of this entry »


Solving the JAXB “unexpected element” problem

Monday 2015-06-08

-1If you are using JAXB in a maven/java project to unmarshal an XML document and you get:

javax.xml.bind.UnmarshalException: unexpected element (uri:”urn:iso:std:somestuff:xsd:somestuff”, local:”Document”). Expected elements are (none)

Or if you are using JAXB to marshal an XML document and you get:

com.sun.istack.internal.SAXException2: unable to marshal type “generated.somestuff.Document” as an element because it is missing an @XmlRootElement annotation

You have probably fallen victim of the fact that JAXB does not do “Simple Binding” by default. If your project is a maven project and you generated classes based on an xsd file, this is how you fix it (without changing the xsd file):

Read the rest of this entry »


Import/export an Oracle Schema using JDBC

Friday 2015-01-02

Everybody gets a database!When doing integration testing or fixing a bug in a piece of Java code that uses Oracle as a database, being able to do quick exports and imports of your schema can be a big help. Sometimes just calling Oracle’s imp/exp commandline tools from your code can be of help, but I was looking for something a bit more portable and less demanding on my local development machine. I found that Oracle’s datapump functionality can be called from stored procedures, which in turn can be called from a normal JDBC statement.

Read the rest of this entry »


Print posters on a regular printer with Excel.

Thursday 2014-05-15

TS-50-RX-TX-board-banner

I recently needed to print out a big schematic diagram of the RX/TX board of a Kenwood TS50 Transceiver. This did not fit on a single piece of paper. Instead of downloading all kinds of crappy tools or uploading the image to some “free” site which is going to use it for whatever they think justifies their definition of “free”, I found out you can do this in Excel. Here’s how:

  1. Make sure the image you want to print out as a poster has a decent resolution
  2. Open Excel (maybe this will work in LibreOffice too, I haven’t tested, let me know)
  3. Drag the image into a new worksheet so that it is top-left of the sheet.
  4. Open the “Print preview” (the little icon in the bottom left of the window)
  5. Resize the image so that it covers more than one page, up to the number of pages you’d like the poster to be. Your screen should now look somewhat like this:
    Screen Shot 2014-05-15 at 21.58.23
  6. Optional: Adjust the page margins.
  7. Print.

After this, you’ll be gluing the pages together, but I think you already figured that out beforehand.

Have fun!