Skip to content

Instantly share code, notes, and snippets.

View roaldnefs's full-sized avatar

Roald Nefs roaldnefs

View GitHub Profile
roaldnefs / openapi.yaml
Last active June 10, 2024 21:14
OpenApi specification for xkcd
openapi: 3.0.0
version: 1.0.0
title: xkcd
description: 'A webcomic of romance, sarcasm, math, and language.'
- url:
description: Official xkcd JSON interface
roaldnefs / mac-docker-gui.txt
Created December 22, 2019 10:27
Running GUI application in Docker on MacOS
# Install XQuartz
brew cask install xquartz
# Restart MacOS
# Open XQuartz
open -a XQuartz
# Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on
roaldnefs /
Created July 18, 2019 19:21
DSMR Emulator (Python)
#!/usr/bin/env python
# socat -d -d pty,raw,echo=0 pty,raw,echo=0
import serial
import time
import argparse
TELEGRAM1 = """/ISK5\2M550T-1012
roaldnefs /
Created November 22, 2017 17:21
Restart Salt Services via Salt

Restarting the salt-minion:

# Restart salt-minion in the background (on changes only).
    - name: 'salt-call --local service.restart salt-minion'
    - bg: True
 - order: last
roaldnefs /
Last active July 25, 2017 18:46
Raspberry PI Zero W headless Raspbian

Start by downloading the latest Raspbian from:

Copy the image to the SD-card:

dd bs=4M if=2017-07-05-raspbian-jessie.img of=/dev/sdX conv=fsync

Mount the SD-card and add the wireless configuration file named wpa_supplicant.conf to the root of the boot partition: