snippet

Bounce the macOS Terminal icon from a script

How to bounce the Terminal icon in the Dock by using a script command. The bounce is caused by the ASCII bell control code, number 7. By echoing the \a special character you send an alert to the terminal window.

Blocking vs non-blocking timers in Arduino and Particle

When coding for Arduino you may wish to run certain code once every N milliseconds. For a very simple program like blinking a LED with a 2 seconds interval using the delay() function will be sufficient. But what about multiple bits of code where each require a different interval? Using delay() they will slow each other down, significantly disrupting your program. The solution is the meassure the last time the code parts were executed.

Setup local DNS resolver on macOS Sierra

Simple instructions on how to install a local PowerDNS Recursor on macOS 10.12 Sierra to avoid using the DNS servers provided in your network or by your internet provider.

SVG scaling

Quick reference to scaling SVG images using the tag attributes

Before exit scripts in Node.js

Ever wonder how to do something just before a Node.js process ends? Safely close connections, clean up caches, or log your app’s status somewhere? Wonder no more. With this script you can do it.¬†Have fun!

vnStat data traffic on Ubuntu login

Display data traffic statistics and estimates from vnStat for today and the current month on your Ubuntu Server login motd (message of the day)

Looping busy indicator

Javascript code snippet for node.js to display a looping busy indicator on the console output