Alarm clock for kids

Alarm clock for kids

I’ve created a very simple Raspberry Pi project that I use to let my kid know if its daytime or nighttime. When I say goodnight and leave my kids bedroom, I trigger a simple script on my Raspberry Pi with a 7″ touchscreen attached. The screen will display a daytime image for a few minutes, before switching to a nighttime image. The nighttime image is an indication for my kid to put down her toys and go to bed. Over…

Read More Read More

Using the “Oboe” Javascript library to speed up data processing

Using the “Oboe” Javascript library to speed up data processing

One of our node.js applications at work was designed to call an internal rest service, cache the whole response, and iterate over the data to separate relevant data from non-relevant data, and write the relevant data to file. To speed things up a bit, we wanted to process, filter and write the data to file as it arrived. For this task, the excellent Javascript library “Oboe” came in handy:

Keywords: HTTP response streaming

Using Maven to build and run Java applications

Using Maven to build and run Java applications

Say you want to have Maven handle the dependencies for your java application containing the well known “public static void main” method. Create a Maven project, put your MyApplication.java file under the “src”-folder, and add something like this to you pom.xml:

Now you can run your application using the exec-maven-plugin, like this:

“Løp til bussen” – Android-app’en som forteller deg om bussen din er forsinket

“Løp til bussen” – Android-app’en som forteller deg om bussen din er forsinket

For å lære meg litt om Android-programmering jeg har laget en enkel app. App’en er svært enkel, og har som eneste formål å vise sanntidsinfo for din neste reise med buss, bane, tog, trikk eller båt. Utgangspunktet mitt var at jeg enkelt ønsket å finne ut om jeg måtte løpe til bussen eller ikke, for jeg har altfor mange ganger løpt til bussen tidlig om morgenn, for så å bli stående å vente på den fordi den er forsinket.

Simple script for dumping a MySQL database

Simple script for dumping a MySQL database

As file system backups might fail to backup open files, it’s good practice to close any open files before running the backup. Closing a MySQL database file means you will have to stop the MySQL server itself, causing causing a database outage while the backup is running. But fortunately there’s a smarter way to backup you database – simple dump the entire database to a file (which is automatically closed when the dump is completed), and have your file system…

Read More Read More

Setting up Sublime Text as a node.js development environment

Setting up Sublime Text as a node.js development environment

Sublime Text makes a great IDE for node.js development. First, install the node.js software and get your initial project up and running. Various tutorials on the web should get you going. When it’s time to run your app, configure the Sublime Text build system to build it and run it. To avoid having to start and stop your Node server manually, make use of the tool Nodemon – this tool will build and run your app automatically when you edit…

Read More Read More