Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Brunner tobru

View GitHub Profile
@tobru
tobru / lychee_tag.rb
Last active Apr 7, 2021
A Liquid tag for Jekyll sites that allows embedding Lychee albums. See https://tobrunet.ch/articles/jekyll-meets-lychee-a-liquid-tag-plugin/
View lychee_tag.rb
# 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 Mar 22, 2014
A git post-receive hook for Jekyll which supports branches
View post-receive
#!/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 / README.md
Last active Jan 7, 2022
A dashing widget which displays the currently playing song on a squeezebox player.
View README.md

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 / keybase.md
Created Mar 2, 2015
Keybase.io prove
View keybase.md

Keybase proof

I hereby claim:

  • I am tobru on github.
  • I am tobru (https://keybase.io/tobru) on keybase.
  • I have a public key whose fingerprint is 9222 3854 4B44 1DBC F8D8 3297 487C A707 190A 2598

To claim this, I am signing this object:

View cachet_vagrant.md

Vagrant support is maintained by Cachet users from within the community.

Getting started

  • Install Vagrant
  • Install Composer
  • Add the Homestead box to Vagrant: vagrant box add laravel/homestead
  • Clone the Cachet repository from Github: git clone https://github.com/cachethq/Cachet.git
  • Change into this new directory
  • Copy .env: cp .env.example .env
@tobru
tobru / migrate_lobsters_to_shaarli.php
Created Oct 5, 2015
Helper to migrate links from lobsters to Shaarli
View migrate_lobsters_to_shaarli.php
<?php
$GLOBALS['config']['DATADIR'] = 'data'; // Data subdirectory
$GLOBALS['config']['CONFIG_FILE'] = $GLOBALS['config']['DATADIR'].'/config.php'; // Configuration file (user login/password)
$GLOBALS['config']['DATASTORE'] = $GLOBALS['config']['DATADIR'].'/datastore.php'; // Data storage file.
$GLOBALS['config']['CACHEDIR'] = 'cache'; // Cache directory for thumbnails for SLOW services (like flickr)
$GLOBALS['config']['PAGECACHE'] = 'pagecache'; // Page cache directory.
// User configuration
if (is_file($GLOBALS['config']['CONFIG_FILE'])) {
require_once $GLOBALS['config']['CONFIG_FILE'];
}
@tobru
tobru / UrdorfAdventsfenster2017.kml
Created Dec 10, 2017
Adventsfenster in Urdorf 2017 (KML)
View UrdorfAdventsfenster2017.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
@tobru
tobru / openshift-api.log
Created Apr 5, 2018
OpenShift API Start Log
View openshift-api.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"
@tobru
tobru / full-openshift-start.log
Last active Apr 9, 2018
OpenShift 3.7 on ARM (OrangePI)
View full-openshift-start.log
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 / README.md
Created Jan 15, 2019
Triggermesh OnPrem
View README.md

[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