Skip to content

Instantly share code, notes, and snippets.

View fpletz's full-sized avatar
🦺
building

Franz Pletz fpletz

🦺
building
View GitHub Profile
@fpletz
fpletz / flukso_get.py
Last active February 25, 2017 00:30
flukso -> sqlite
#!/usr/bin/python
from urllib2 import urlopen
import json
import pysqlite2.dbapi2 as dbapi
s = urlopen('http://localhost:8888/sensor/3bf0b9c10449b96ab972425045e36106').read()
data = json.loads(s)
@fpletz
fpletz / githubhooker.go
Created July 8, 2013 23:06
Simple Github Webhook server and parser in Go
package main
import (
"net/http"
"runtime"
"encoding/json"
"fmt"
)
type GitHubUser struct {
@fpletz
fpletz / error.log
Created September 4, 2014 19:12
apache2 passenger puppetmaster 3.7.0
[ 2014-09-04 18:54:04.4660 11287/7f0691bfb700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /etc/puppet/rack#default: An error occured while starting up the preloader.
in 'void Passenger::ApplicationPool2::SmartSpawner::handleErrorResponse(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:455)
in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:566)
in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:752)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:804)
[ 2014-09-04 18:54:04.4661 11287/7f068b7fe700 agents/HelperAg
@fpletz
fpletz / dhcpcd.conf
Last active August 29, 2015 14:07
VPN roadwarrior network configuration setup with dhcpcd 6.x
# We don't care about some DHCP options per default
nooption domain_name_servers, domain_name, domain_search, host_name
# Allow sudo-enabled users to control dhcpcd
controlgroup wheel
ipv6ra_own
noipv4ll
noarp
@fpletz
fpletz / Makefile
Created April 24, 2015 00:13
tinc 1.1 openwrt
include $(TOPDIR)/rules.mk
PKG_NAME:=tinc
PKG_VERSION:=6568cffd52d4803effaf52a9bb9c98d69cf7922a
PKG_RELEASE:=1
PKG_SOURCE:=6568cffd52d4803effaf52a9bb9c98d69cf7922a.tar.gz
PKG_SOURCE_URL:=https://github.com/gsliepen/tinc/archive/
PKG_MD5SUM:=e103c26844530facdaf2ce4d04fdd25c
@fpletz
fpletz / mkpasswd.nix
Created May 28, 2015 21:02
overrideDerivation fails overriding meta attribute
$ nix-env -f ~/src/nixpkgs -iA mkpasswd --show-trace
replacing old ‘mkpasswd-5.2.8’
installing ‘mkpasswd-5.2.8’
error: while evaluating the attribute ‘meta’ of the derivation ‘mkpasswd-5.2.8’ at "/home/fpletz/src/nixpkgs/pkgs/tools/networking/whois/mkpasswd.nix":5:5:
cannot coerce a set to a string, at "/home/fpletz/src/nixpkgs/pkgs/tools/networking/whois/mkpasswd.nix":5:5
@fpletz
fpletz / 0004-Add-Filter-ICMPv6-router-advertisements-from-gateways.patch.patch
Created June 13, 2015 16:36
gluon-build/patches/packages/routing/0004-Add-Filter-ICMPv6-router-advertisements-from-gateways.patch.patch
From: Your Name <[email protected]>
Date: Fri, 12 Jun 2015 21:40:11 +0000
Subject: Add Filter-ICMPv6-router-advertisements-from-gateways.patch
diff --git a/batman-adv/patches/0002-Filter-ICMPv6-router-advertisements-from-gateways.patch b/batman-adv/patches/0002-Filter-ICMPv6-router-advertisements-from-gateways.patch
new file mode 100644
index 0000000..ed4031f
--- /dev/null
+++ b/batman-adv/patches/0002-Filter-ICMPv6-router-advertisements-from-gateways.patch
@@ -0,0 +1,71 @@
@fpletz
fpletz / fastd.conf
Created July 22, 2015 22:06
ffmuc fastd vpn offloader hack
secret "xxx";
log to syslog level info;
method "salsa2012+umac";
log to syslog level verbose;
mode tap;
interface "ffmuc-mesh-vpn";
mtu 1426;
status socket "/var/run/fastd.ffmuc.socket";
secure handshakes yes;
packet mark 1;
@fpletz
fpletz / alfred2influx.py
Created August 19, 2015 15:56
Simple Alfred to InfluxDB importer
#!/usr/bin/env python3
import json
import sys
from influxdb import InfluxDBClient
series = {
'loadavg': ['value'],
'idletime': ['value'],
@fpletz
fpletz / lxc.network.script.up+down
Created September 10, 2015 13:13
LXC Dynamic Interfaces
#!/bin/bash
if [ "$3" == "up" ]; then
lxc-device -n hermes add $5
lxc-attach -n hermes ip link set $5 up
lxc-attach -n hermes ifup $5
elif [ "$3" == "down" ]; then
lxc-attach -n hermes ifdown --force $5
fi