Skip to content

Instantly share code, notes, and snippets.

Christian Höltje docwhat

Block or report user

Report or block docwhat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
docwhat / docker-bridge-example.bash
Created Apr 6, 2019
Example of using docker bridge networking
View docker-bridge-example.bash
PS4='+\[\033[01;34m\](${BASH_SOURCE[0]}:${LINENO})\[\033[00m\]: ${FUNCNAME[0]:+\[\033[01;33m\]${FUNCNAME[ 0]}()\[\033[00m\]: }'
set -eu
# Tear Down previous run
docker container rm -f db client || true
docker network rm majidi || true
docwhat / Jenkinsfile
Last active Apr 29, 2019
Example pipeline usage of the Jenkins Mask Passwords plugin
View Jenkinsfile
// Requires to run
* Runs code with secret environment variables and hides the values.
* @param varAndPasswordList - A list of Maps with a 'var' and 'password' key. Example: `[[var: 'TOKEN', password: 'sekret']]`
* @param Closure - The code to run in
* @return {void}
def withSecretEnv(List<Map> varAndPasswordList, Closure closure) {
docwhat /
Last active Aug 14, 2018

The format of the env-file is explain at

# I'm using bash, but it applies with sh and zsh as well.
# Create a simple env-file for testing.  We're using = and ! to
# push at some corner cases.
$ echo 'THISISAVARIABLE=This is the value that even has an = sign!' > /tmp/concoction.env
$ cat /tmp/concoction.env
docwhat / Dockerfile
Created May 18, 2018
Multi-stage maven dockerfile with caching
View Dockerfile
# Requires docker 17.06 to build
# ----
# Install Maven
FROM openjdk:8-jdk-alpine AS maven
RUN apk add --no-cache curl tar bash
RUN mkdir -p /usr/share/maven && \
curl -fsSL$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -xzC /usr/share/maven --strip-components=1 && \
docwhat / async-requires1.js
Created Mar 23, 2018
Debugging Gist slowness
View async-requires1.js
This file has been truncated, but you can view the full file.
// prefer default export if available
const preferDefault = m => m && m.default || m
exports.components = {
"component---src-templates-post-js": require("gatsby-module-loader?name=component---src-templates-post-js!/Users/docwhat/Play/WebSites/docwhat/src/templates/post.js"),
"component---src-templates-page-js": require("gatsby-module-loader?name=component---src-templates-page-js!/Users/docwhat/Play/WebSites/docwhat/src/templates/page.js"),
"component---cache-dev-404-page-js": require("gatsby-module-loader?name=component---cache-dev-404-page-js!/Users/docwhat/Play/WebSites/docwhat/.cache/dev-404-page.js"),
"component---src-pages-all-js": require("gatsby-module-loader?name=component---src-pages-all-js!/Users/docwhat/Play/WebSites/docwhat/src/pages/all.js"),
"component---src-pages-index-js": require("gatsby-module-loader?name=component---src-pages-index-js!/Users/docwhat/Play/WebSites/docwhat/src/pages/index.js"),
docwhat / nerd-firacode-font.css
Last active Oct 13, 2018 — forked from danielfullmer/nerd-font.css
blinksh font configuration file
View nerd-firacode-font.css
@font-face {
font-family: 'Nerd FiraCode Retina';
src: local('Nerd FireCode Retina'), url('') format('opentype');
* {
text-rendering: optimizeLegibility;
docwhat / Jenkinsfile
Created Feb 10, 2017
Jenkinsfile: check scm woes with the GitHub Org Folders
View Jenkinsfile
node {
stage('desired') {
// This is what I'd like to be able to do... Though there are lots of other extenions that are useful, like
// CleanBeforeCheckout and PruneStaleBranch
// Don't forget submodule configuration!
scm.extenions = scm.extensions + [[$class: 'CloneOption', noTags: true, reference: '', shallow: true]]
checkout scm
docwhat / .gitignore
Last active Nov 6, 2016
zsh-syntax-hightling + zsh-autocorrect breaks history-incremental-pattern-search-backward
View .gitignore
docwhat / Gather Windows.applescript
Created Sep 8, 2016
Gather Windows: useful when disconnecting a second monitor
View Gather Windows.applescript
-- Variation on
-- Differences:
-- All windows that are more or less off-screen (no matter how much) are moved back
-- so that they are completely on screen (if possible).
-- Gabriel Zachmann, Jan 2008
-- List of processes to ignore (example {"xGestures", "OtherApp", ...})
property processesToIgnore : {"Typinator", "Google Chrome Helper"}
docwhat / .gemrc
Last active Jul 15, 2016
Bug in ChefDK's setting of --user flag
View .gemrc
install: --no-document
update: --no-document
You can’t perform that action at this time.