Skip to content

Instantly share code, notes, and snippets.

View katallaxie's full-sized avatar
👨‍💻
Staying hungry. Staying foolish.

Sebastian Döll katallaxie

👨‍💻
Staying hungry. Staying foolish.
View GitHub Profile
@katallaxie
katallaxie / observer.go
Last active September 4, 2017 07:03
Simple event observer in Golang
// Copyright © 2017 Sebastian Döll <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@katallaxie
katallaxie / avahi-daemon.conf
Last active September 28, 2020 13:28
Have HomeKit in VLAN's on LEDE
# install avahi
# to configure servce
[server]
allow-interfaces=br-<private-network>,br-<iot-network>
use-ipv4=yes
use-ipv6=no
allow-interfaces=br-lan,br-machina
check-response-ttl=no
use-iff-running=no
cache-entries-max=0
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: weave-net
namespace: kube-system
spec:
template:
metadata:
labels:
name: weave-net
@katallaxie
katallaxie / cloud-config.yaml
Last active October 5, 2016 19:18
CoreOS Cluster on GCE
#cloud-config
coreos:
etcd2:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
# specify the initial size of your cluster with ?size=X
discovery: https://discovery.etcd.io/
# multi-region and multi-cloud deployments need to use $public_ipv4
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
@katallaxie
katallaxie / launch.json
Created August 24, 2016 07:20
Visual Studio Chrome Debug on OSX
# Open Chrome with Remote Debugging
open -a /Applications/Google\ Chrome.app --args --disable-web-security --remote-debugging-port=9222 http://localhost:9222 --user-data-dir
@katallaxie
katallaxie / restart.sh
Created January 9, 2016 08:57
Automatically restart a CISCO 3208G on UMW
#!/bin/sh
usr=admin
pwd=atlanta
ip=192.168.0.1
tmp=/tmp/deviceRestart
cookies=cookies.txt
#improve the logread output
sqm_logger() {
@katallaxie
katallaxie / gist:6013dada2897cc603487
Created January 7, 2016 14:52
Rebootable and faster OpenWRT on RouterBoard RB2011
# reboot
rbcfg set boot_device nand
rbcfg set boot_protocol dhcp
rbcfg set booter backup
# and to be fast
rbcfg set cpu_mode regular
# have it applied
rbcfg apply