Skip to content

Instantly share code, notes, and snippets.


Ruben Jenster r10r

View GitHub Profile
r10r /
Created Jul 8, 2020
Self terminate shell script after deadline.
deadline() {
sleep $1
kill $PID
export deadline
deadline 2 &
r10r /
Last active Jul 6, 2020
Bash command wrapper with partial option parsing.
# parse a subset of all options
while true; do
while getopts c:u:b: arg 2>/dev/null; do
case $arg in
r10r /
Last active Jul 10, 2018
Cmdline Best Practises

Help / Usage Syntax

Usage string format:

cmd_name [options] arg1_name [arg2_name]

  • List paths to config files and used environment variables.
  • Show links / hints for more detailed information.


r10r /
Last active Dec 7, 2017
Golang Cheatsheet

List external dependencies

go list -f '{{.Deps}}' | tr "[" " " | tr "]" " " | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
r10r / vimrc.local
Last active Sep 14, 2020
My vim config file
View vimrc.local
" location of this file:
" debian: /etc/vim/vimrc.local
" custom build: /usr/local/share/vim/vimrc
" avoid that defaults overwrite custom configuration
" see
" run ':scriptnames' to show the import order
let skip_defaults_vim=1
source $VIMRUNTIME/defaults.vim
r10r /
Created Aug 14, 2016 — forked from eliquious/
Golang OpenPGP examples


go build -o goencrypt main.go

Generating Keys

r10r / clearsign_test.go
Created Jul 19, 2016
Test golang OpenPGP message signing (clearsign).
View clearsign_test.go
package repository
import (
r10r / redmine_release_notes.tmpl.yml
Last active Jul 8, 2016
Format to export Release Notes from Redmine to YAML
View redmine_release_notes.tmpl.yml
Name: %{name}
Date: %{date}
Id: %{id}
Description: %{description}
Subject: %{subject}
ReleaseNotes: '%{release_notes}'
Id: %{id}
Tracker: %{tracker}
r10r / find.go
Created Jun 28, 2016
Simple directory listing with include / exclude pattern support.
View find.go
package main
import (
r10r / asymmetric.go
Last active Aug 27, 2015 — forked from cryptix/asymmetric.go
example of using JWT for http authentication in go
View asymmetric.go
package main
// using asymmetric crypto/RSA keys
import (
You can’t perform that action at this time.