Skip to content

Instantly share code, notes, and snippets.

View christofluethi's full-sized avatar

Christof Lüthi christofluethi

View GitHub Profile
@christofluethi
christofluethi / vimrc
Created November 4, 2018 15:09
vimrc
" ~/.vimrc
" christof luethi, shaped.ch, 2006-2018
"
" Key Bindings:
" <F2>: past toggle (past without autoindent)
" <F3>: open file under cursor
" <F4>: toggle line numbers
" <F5>: open directory in new tab
" <F6>: toggle line wrapping
" <F7>: toggle list chars (show non printable chars)
@christofluethi
christofluethi / docker-swarm-setup-centos.md
Created December 4, 2018 20:43
Simple docker swarm setup on Centos 7

Install Docker Swarm on Centos 7

Basic Installation

Install required packages

yum install yum-utils lvm2 device-mapper-persistent-data

Add Docker-Repository

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@christofluethi
christofluethi / okd-v311-kvm-installation.md
Last active September 21, 2021 14:59
OpenShift OKD 3.11 on CentOS Linux 7.6 VMs

Install OKD v3.11 on CentOS Linux 7.6

Host system is Ubuntu 16.04 LTS with 8 CPUs and 32GB Ram

Domain-name: *.example.com

Host Prepare

Configure VMs

Install virt-manager

sudo apt-get install virt-manager
@christofluethi
christofluethi / worktime-calculator.sh
Last active January 4, 2024 13:27
Work time calculator
#!/bin/zsh
if [ "$1" = "--help" -o "$1" = "-h" -o $# -gt 4 ]; then
echo "Simple calculator for same-day office hour calculation\n"
echo "Usage: $0 [-h] [start] [end] [break] [output]\n"
echo " start: Start of working or '0' to use the system boot time. Format hh:mm"
echo " end: End of working or '0' to use the current time. Format hh:mm"
echo " break: Minutes to be subtracted from work time. AKA lunch break, etc."
echo " output: Use 'short' for a one-line output.\n\n"