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 / 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
@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 / 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 / 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
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: weave-net
namespace: kube-system
spec:
template:
metadata:
labels:
name: weave-net
@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
@katallaxie
katallaxie / observer.go
Last active September 4, 2017 07:03
Simple event observer in Golang
// Copyright © 2017 Sebastian Döll <sebastian@katallaxie.me>
//
// 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 / pom.xml
Last active October 9, 2017 07:52
Exhibitor
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>exhibitor</groupId>
<artifactId>exhibitor</artifactId>
<version>1.6.0</version>
<dependencies>
<dependency>
<groupId>io.soabase.exhibitor</groupId>
events {
worker_connections 1024;
}
error_log /dev/stdout info;
http {
access_log /dev/stdout;
upstream docker-registry {
@katallaxie
katallaxie / mime_types.js
Last active August 14, 2018 10:41
Mime Types
export default {
'3dmf': 'x-world/x-3dmf',
'3dm': 'x-world/x-3dmf',
'avi': 'video/x-msvideo',
'ai': 'application/postscript',
'bin': 'application/octet-stream',
'bin': 'application/x-macbinary',
'bmp': 'image/bmp',
'cab': 'application/x-shockwave-flash',
'c': 'text/plain',