Skip to content

Instantly share code, notes, and snippets.

View aequitas's full-sized avatar

Johan Bloemberg aequitas

View GitHub Profile
### Keybase proof
I hereby claim:
* I am aequitas on github.
* I am aequitas (https://keybase.io/aequitas) on keybase.
* I have a public key whose fingerprint is F4E9 7F55 9C3F 11A7 5235 278F 04CA E076 A27F 7FB8
To claim this, I am signing this object:
@aequitas
aequitas / gist:4efde9e8c5a4a6c32a8d
Created July 15, 2015 08:55
Fritzbox pppoe passthrough
# enable telnet: http://www.van-sluis.nl/?p=208
# login: telnet 192.168.2.1
# edit /var/flash/debug.cfg
$ nvi /var/flash/debug.cfg
while sleep 30;do
if [ -z "`brctl show|grep ptm_vr9`" ];then
killall dsld telefon voipd pbd
sleep 10
ifconfig ptm_vr9 up
brctl addif lan ptm_vr9
@aequitas
aequitas / Commands
Created September 21, 2015 12:46
pytest-flask pytest-2.8 bug
virtualenv env
env/bin/pip install pytest
env/bin/py.test test.py --doctest-modules
env/bin/pip install pytest-flask
env/bin/py.test test.py --doctest-modules
@aequitas
aequitas / README
Last active February 10, 2016 12:49
bitbar-plugin-images
repo for bitbar images
@aequitas
aequitas / ip-up
Created May 17, 2016 10:12 — forked from p120ph37/ip-up
PPP VPN split-network/split-DNS script for OSX
#!/bin/sh
####################################################
## ##
## PPP VPN split-network/split-DNS script for OSX ##
## by Aaron Meriwether ##
## ##
## installation: ##
## sudo cp thisfile /etc/ppp/ip-up ##
## sudo chmod 755 /etc/ppp/ip-up ##
## ##
@aequitas
aequitas / ssl-expire
Last active September 23, 2016 11:48
#!/bin/bash
# based on: https://github.com/skylime/mi-core-base/blob/master/copy/opt/core/bin/ssl-expire.sh
domains=${*:?}
today_unixtime=$(date +%s)
trigger_unixtime=$(date +%s -d "+31 days")
for domain in ${domains}; do
# example reading two serial devices using pyserial, asyncio and coroutines
import serial_asyncio
import asyncio
@asyncio.coroutine
def serial_read(device, **kwargs):
reader, writer = yield from serial_asyncio.open_serial_connection(url=device, **kwargs)
while True:
line = yield from reader.readline()
;FLAVOR:RepRap
;TIME:4072
;Filament used: 4.0237m
;Layer height: 0.2
;Generated with Cura_SteamEngine 2.6.2
M190 S60
M104 S200
M109 S200
; use octoprint start
;LAYER_COUNT:240