Skip to content

Instantly share code, notes, and snippets.

Brad Koehn koehn

  • Koehn Consulting, Inc.
Block or report user

Report or block koehn

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

Keybase proof

I hereby claim:

  • I am koehn on github.
  • I am koehn ( on keybase.
  • I have a public key ASAxVSsmthQySpAjuJlqGcI4c5bVXQHf9H5bRcwT_fEchwo

To claim this, I am signing this object:

koehn /
Created Jul 1, 2016
Clean up dangling docker volumes
docker volume ls -qf dangling=true | xargs -r docker volume rm
koehn / txt
Created Mar 7, 2016
Fix Mac Docker
View txt
Run the Docker Quickstart Terminal app
Run docker-machine restart default
Run eval $(docker-machine env default)
koehn / diaspora-init
Created Dec 16, 2015
Required for my `/etc/init.d/diaspora` init script. Put this into `/home/diaspora/diaspora/diaspora-init`.
View diaspora-init
#!/bin/bash --login
shopt -s expand_aliases
export RAILS_ENV=production
export DB=postgres
cd /home/diaspora/diaspora
koehn / diaspora
Last active Aug 14, 2016
Init file to start/stop Diaspora. Requires a file in /home/diaspora/diaspora/diaspora-init (see my gists for more). Hit me up on diaspora at if you have any questions.
View diaspora
#! /bin/sh
# Provides: diaspora
# Required-Start: apache2
# Required-Stop:
# Should-Start:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Diaspora social networking pod server
koehn / java2groovy.vim
Last active Aug 29, 2015
These VIM macros help to covert Java to Groovy. Sadly neither IntelliJ nor Eclipse has regex that can handle this, but VIM is always available.
View java2groovy.vim
# no semicolons at eol
:%s/;[ \t]*$//
# no 'public'
:%s/public //
# convert Java 'bar.getFoo()' to Groovy '' in VIM
# convert Java 'foo.setBar(baz)' to Groovy ' = baz'
koehn /
Created May 30, 2014
My standard welcome message.

Welcome to the pod! Be sure to check out the tutorials and wiki to learn how diaspora works.


koehn /
Created May 14, 2014
Configure dovecot 2.x build
./configure --with-pam --with-solr --with-sql --with-mysql --with-zlib --with-bzlib
koehn /
Last active Jan 3, 2016
Test your Java generics knowledge with this pop quiz: which are the valid statements?
import java.util.List;
public class GenericsQuiz {
List<Number> listOfNumber;
List<? extends Number> listOfExtendsNumber;
List<? super Number> listOfSuperNumber;
List<Integer> listOfInteger;
List<? extends Integer> listOfExtendsInteger;
List<? super Integer> listOfSuperInteger;
koehn /
Created Jan 4, 2014
A simple command-line utility to use AppleScript (neé OSAScript) to quit an application. Usage: `quit [Application Name]`
osascript -e "tell application \"$1\" to quit"
You can’t perform that action at this time.