Skip to content

Instantly share code, notes, and snippets.

View christofluethi's full-sized avatar

Christof Lüthi christofluethi

View GitHub Profile
christofluethi /
Last active January 4, 2024 13:27
Work time calculator
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"
christofluethi /
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: *

Host Prepare

Configure VMs

Install virt-manager

sudo apt-get install virt-manager
christofluethi /
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
christofluethi / vimrc
Created November 4, 2018 15:09
View vimrc
" ~/.vimrc
" christof luethi,, 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 /
Last active August 9, 2018 07:58

Installation of NodeJs, npm, TypeScript, AngularJS, @angular/cli on Windows 7 Professional SP 1 64-bit:

Since I have found many valuable hints scattered on various posts only after 'painful' search, here a compact compilation (not my ideas but my experience). Hope it helps. install Node.js Windows Installer 64-bit: Set npm directory for packages (npm 3.10.10 comes with Node.js but we'll update it later):

npm config set registry

Update npm to the latest version:

christofluethi / wildfly-jms-queue.txt
Created November 23, 2017 11:08
List and remove messages in WildFly JMS Queue
View wildfly-jms-queue.txt
# Run JBoss CLI-Client
$ java -jar wildfly/bin/client/jboss-cli-client.jar
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
# Connect to WildFly Server
[disconnected /] connect localhost:9990
Warning! The CLI is running in a non-modular environment and cannot load commands from management extensions.
# Switch to JMS Dead-Letter-Queue (DLQ)
[standalone@localhost:9990 /] cd subsystem=messaging-activemq/server=default/jms-queue=DLQ
christofluethi / six-companies
Created October 10, 2017 21:57
SIX Companies
View six-companies
3M,3M Company,MMM
Abbott,Abbott Laboratories,ABT
AbbVie,AbbVie Inc,ABBV
Actelion,Actelion Ltd.,ATLN
Addex,Addex Therapeutics Ltd,ADXN
Adecco,Adecco Group AG,ADEN
Adval,Adval Tech Holding AG,ADVN
christofluethi / news-agencies
Last active October 10, 2017 17:27
News Agencies
View news-agencies
awp international;awp international
DGAP News-Service;DGAP-News
christofluethi /
Last active February 9, 2017 09:45
Bash on Windows
christofluethi /
Last active February 13, 2021 06:59
HP Zbook 15 G3 Installation

HP ZBook 15 G3 - Ubuntu GNOME - 16.04 LTS

*: Included in the image

Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos