Skip to content

Instantly share code, notes, and snippets.

Jason Kohles jasonk

Block or report user

Report or block jasonk

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
jasonk /
Last active Aug 2, 2019
Pull request message hooks for hub

I'm a big fan of hub, but I found myself wishing for the ability to use git hooks on pull-request messages the same way you can on commit messages with prepare-commit-msg and commit-msg hooks. People have been asking for hub to be able to do this for a while, but until that happens, here is a way you can do it yourself, right now.

To use this, just drop the script below into your $PATH somewhere, and make sure you have your $EDITOR environment variable set to whatever command runs your real editor, and then set your $GIT_EDITOR environment variable to run the hub-editor script.

The way this works is that when hub-editor is invoked with a file named PULLREQ_EDITMSG (which is the filename hub uses for editing pull requests) then it will run the prepare-pull-request-msg and pull-request-msg scripts from your .git/hooks directory (if they exist and are executable). If hub-editor is invoked with any other file

jasonk /
Last active Apr 27, 2019
Lazy developers use branch names to keep track of their tickets

On my team we like to put ticket numbers in commit messages, so that Jira finds them and puts links to the commits in the ticket. The problem is that I have a really hard time remembering my ticket numbers. What I've been doing is creating a branch for each ticket, but while that helps me remember the numbers, it still doesn't help me remember which ticket is which. I had tried posting comments to myself in Slack to keep track of them, but then it occurred to me that I didn't need to be using just the ticket number as the branch name, so now I'm trying something new.

Instead of creating branches with just the ticket number, I'm using ticket/short-description. The length of the branch name doesn't affect much, thanks to tab completion, and having that information available at a glance right in the repo is huge, especially since I have the branch name as part of my prompt.

[me@my-machine:dir PROJ-1234/fix-ci ]$ git branch
jasonk / Jenkinsfile
Last active Apr 12, 2020
Docker credential helper for authenticating from environment variables
View Jenkinsfile
pipeline {
environment {
DOCKER_CREDS = credentials( 'my-docker-credentials' )
jasonk / TamperMonkey
Last active Sep 30, 2019
TamperMonkey Utility Scripts
View TamperMonkey

TamperMonkey Utility Scripts

To use, include them in your TamperMonkey script, like so:

// @require
// @require

Note that tampermonkey-utils.js must be loaded before any of the others are loaded.


Keybase proof

I hereby claim:

  • I am jasonk on github.
  • I am jasonkohles ( on keybase.
  • I have a public key ASDct1967s50TUfSbObjpQyCXi0IYMbrRd0ZRzh2DDpaYwo

To claim this, I am signing this object:

jasonk /
Last active Oct 7, 2015
Monkey patch Meteor to use CA certs from the OS X keychain.
set -e
# This script monkey-patches MeteorJS to allow it to work from behind a MITM
# proxy that forges SSL keys. You may need this to get through a corporate
# content-inspection proxy, for example, since Meteor doesn't allow you to
# specify the CA certs to use.
cd "$HOME/.meteor"
cd "$(dirname "$(readlink meteor)")"
cd tools
jasonk /
Last active Aug 29, 2015
Setup script for Minecraft Bukkit, ScriptCraft, and MQTT
cd "$(dirname "$0")"
# CraftBukkit download URL
# ScriptCraft download URL
# Install CraftBukkit
if [ ! -f craftbukkit.jar ]; then
You can’t perform that action at this time.