Comparing Sandboxing Tools

Comparing some tools to make it less dangerous to run code you did not write. Sandboxing seems to be the best way to go like Deno and wasmtime do. But what about Python, Node.js, etc.?
firejail seems to be have hit the sweet spot between “secure” and “convenient”.

Firebase Real Time Updates

Firebase Cloud Firestore has the nice feature of being able to tell you about changes to its data. Here’s how this looks like using Node.js: Requirement A Firebase Cloud Firestore DB, named ‘messages’. Has 2 entries per document: sender and text, both being strings. Service Account Key Get your service account secret from Get yourContinue reading “Firebase Real Time Updates”

BME280 and Node.js on OrangePi

I got some more sensors, like an Bosch BME280 which uses I²C bus. Neat as it can measure temperature, air pressure and humidity. Using it on an OrangePi Zero is simple: Enable the I2C-0 module: in /boot/armbianEnv.txt add “i2c0” (or use i2c1 or i2c2) to the overlay. Create /etc/udev/rules.d/60-i2c-tools.rules with the following content: KERNEL==”i2c-0″ ,Continue reading “BME280 and Node.js on OrangePi”

Reading Temperatures from many DS18B20 via Node.js

The easiest way: harald@opz2:~$ cat /sys/bus/w1/devices/28-*/hwmon/hwmon/temp1_input 21812 22375 23375 The problem is that each sensor takes about 800ms (750ms according to data sheet) conversion time. Making this better and reading them concurrently via Node.js: That’s reading all in parallel (plus about 600ms startup time): harald@opz2:~$ node read-temp.js hwmon0 (28-80000004215e): 23.312 hwmon2 (28-0316884578ff): 21.812 hwmon1 (28-0316884fabff):Continue reading “Reading Temperatures from many DS18B20 via Node.js”

Logging via ElasticSearch

The Elastic Stack is a simple way to log “things” into ElasticSearch and make them nicely visible via Kibana. Since ELK can handle logs as well as time series data, I’ll use it for my own logging incl. performance logging. For pure time series data I’d use the TIG stack: Telegraf, InfluxDB and Grafana. InstallingContinue reading “Logging via ElasticSearch”

Create your website with
Get started