Skip to content

Instantly share code, notes, and snippets.

View roaldnefs's full-sized avatar

Roald Nefs roaldnefs

View GitHub Profile
@roaldnefs
roaldnefs / openapi.yaml
Last active August 22, 2022 08:26
OpenApi specification for xkcd
openapi: 3.0.0
info:
version: 1.0.0
title: xkcd
description: 'A webcomic of romance, sarcasm, math, and language.'
servers:
- url: https://xkcd.com/
description: Official xkcd JSON interface
@roaldnefs
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
roaldnefs / dsmr_emulator.py
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
roaldnefs / restart-salt.md
Created November 22, 2017 17:21
Restart Salt Services via Salt

Restarting the salt-minion:

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

Start by downloading the latest Raspbian from: raspberrypi.org.

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: