Skip to content

Instantly share code, notes, and snippets.

View tobru's full-sized avatar

Tobias Brunner tobru

View GitHub Profile
@tobru
tobru / README.md
Last active January 7, 2022 10:40
A dashing widget which displays the currently playing song on a squeezebox player.

Logitech Squeezebox Now Playing

Preview

Screenshot: Squeezebox Widget in action

Description

Squeezebox Now Playing is a a Dashing widget which which displays now playing information from a Logitech Squeezebox player.

@tobru
tobru / zoom-toggle.sh
Created April 19, 2021 14:42
Zoom Toggler
#!/bin/bash
set -eo pipefail
usage() {
echo "Usage: $0 <cmd>"
echo "Available commands:"
echo " * mic"
echo " * vid"
echo " * both"
@tobru
tobru / lychee_tag.rb
Last active April 7, 2021 04:48
A Liquid tag for Jekyll sites that allows embedding Lychee albums. See https://tobrunet.ch/articles/jekyll-meets-lychee-a-liquid-tag-plugin/
# Connects Jekyll with Lychee (http://lychee.electerious.com/)
#
# # Features
#
# * Generate album overview and link to image
# * Caching of JSON data
#
# # Usage
#
# {% lychee_album <album_id> %}
@tobru
tobru / post-receive
Created March 22, 2014 20:38
A git post-receive hook for Jekyll which supports branches
#!/usr/bin/env ruby
require 'fileutils'
GIT_REPO = '/home/me/mywebsite_ch.git'
TMP_GIT_CLONE = '/tmp/mywebsite_ch_clone'
DOCROOT = { 'master' => ENV['HOME']+'/public_html',
'draft' => ENV['HOME']+'/public_html_draft' }
@tobru
tobru / wgclient.sh
Created February 5, 2020 07:18
WireGuard Client Management Shell Script
#!/usr/bin/env bash
IPV4_BASE=10.42.42.
IPV6_BASE=fd86:ea04:1115::
WG_INTERFACE=wg0
SERVER_PUB_KEY="MYPUBKEY"
ROUTED_NET="10.42.42.0/24, fd86:ea04:1115::/64"
#ROUTED_NET_ALL="0.0.0.0/0, ::/0"
SERVER_ENDPOINT="vpn.example.com:51820"
@tobru
tobru / kubec.zsh
Created November 20, 2019 09:41
Kubernetes Config Handling in ZSH
# Kubernetes
kubec() {
export KUBECONFIG=${HOME}/.kube/config_${1}
}
_kubec() {
local configs_avail
configs_avail=(~/.kube/config_*)
for c in $configs_avail; do compadd ${$(basename $c)#"config_"}; done
}
compdef _kubec kubec
@tobru
tobru / README.md
Created January 15, 2019 21:01
Triggermesh OnPrem

[WIP] Deploy TriggerMesh OnPrem

Cluster creation

For infromationm, on GKE we create a cluster without Httploadbalancing because we use an nginx ingress:

gcloud container clusters create NAME --disable-addons HttpLoadBalancing
@tobru
tobru / full-openshift-start.log
Last active April 9, 2018 03:16
OpenShift 3.7 on ARM (OrangePI)
tobru@orangepiwin:~$ uname -a
Linux orangepiwin 3.10.107-pine64 #9 SMP PREEMPT Fri Apr 6 09:05:49 CEST 2018 aarch64 aarch64 aarch64 GNU/Linux
tobru@orangepiwin:~$ free -m
total used free shared buff/cache available
Mem: 1988 621 51 37 1314 1264
Swap: 0 0 0
tobru@orangepiwin:~$ cat /proc/cpuinfo
Processor : AArch64 Processor rev 4 (aarch64)
@tobru
tobru / openshift-api.log
Created April 5, 2018 15:51
OpenShift API Start Log
This file has been truncated, but you can view the full file.
I0404 20:00:59.036642 4164 plugins.go:83] Registered admission plugin "NamespaceLifecycle"
I0404 20:00:59.037089 4164 plugins.go:83] Registered admission plugin "Initializers"
I0404 20:00:59.037184 4164 plugins.go:83] Registered admission plugin "ValidatingAdmissionWebhook"
I0404 20:00:59.037317 4164 plugins.go:83] Registered admission plugin "MutatingAdmissionWebhook"
I0404 20:00:59.037565 4164 plugins.go:83] Registered admission plugin "AlwaysAdmit"
I0404 20:00:59.037655 4164 plugins.go:83] Registered admission plugin "AlwaysPullImages"
I0404 20:00:59.037734 4164 plugins.go:83] Registered admission plugin "LimitPodHardAntiAffinityTopology"
I0404 20:00:59.037817 4164 plugins.go:83] Registered admission plugin "DefaultTolerationSeconds"
I0404 20:00:59.037895 4164 plugins.go:83] Registered admission plugin "AlwaysDeny"
I0404 20:00:59.037989 4164 plugins.go:83] Registered admission plugin "EventRateLimit"
@tobru
tobru / UrdorfAdventsfenster2017.kml
Created December 10, 2017 11:34
Adventsfenster in Urdorf 2017 (KML)
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Adventsfenster Urdorf</name><Style id="ico1"><IconStyle><Icon><href>https://sites.google.com/site/pichostdaevu/_/rsrc/1416772784853/home/number_1.png</href></Icon></IconStyle><LabelStyle><scale>0</scale></LabelStyle></Style>
<name>Adventsfenster Urdorf</name><Style id="ico2"><IconStyle><Icon><href>https://sites.google.com/site/pichostdaevu/_/rsrc/1416772784853/home/number_2.png</href></Icon></IconStyle><LabelStyle><scale>0</scale></LabelStyle></Style>
<name>Adventsfenster Urdorf</name><Style id="ico3"><IconStyle><Icon><href>https://sites.google.com/site/pichostdaevu/_/rsrc/1416772784853/home/number_3.png</href></Icon></IconStyle><LabelStyle><scale>0</scale></LabelStyle></Style>
<name>Adventsfenster Urdorf</name><Style id="ico4"><IconStyle><Icon><href>https://sites.google.com/site/pichostdaevu/_/rsrc/1416772784853/home/number_4.png</href></Icon></IconStyle><LabelStyle><scale>0</scale></LabelStyle></Style>
<nam