Skip to content

Instantly share code, notes, and snippets.

View sean-abbott's full-sized avatar

Sean Abbott sean-abbott

View GitHub Profile
@coffeemancy
coffeemancy / completion.py
Created April 3, 2017 15:37
bash/zsh-completion for python click tools
# -*- coding: utf-8 -*-
"""
Bash completion for click command line interfaces.
Provides bash completion helpers for command-line interfaces.
"""
# batteries included
from __future__ import absolute_import
# third party
@coffeemancy
coffeemancy / build.sh
Created April 3, 2017 15:31
python package boilerplate
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
function _error() {
>&2 printf "\e[31mERROR: $@\e[00m\n"
exit 1
}
@xbeta
xbeta / 00-set-authorization.groovy
Created November 25, 2014 23:38
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)