Skip to content

Instantly share code, notes, and snippets.

@eentzel
eentzel / keybase.md
Created December 6, 2016 17:42
keybase.md

Keybase proof

I hereby claim:

  • I am eentzel on github.
  • I am eentzel (https://keybase.io/eentzel) on keybase.
  • I have a public key ASCJXYNZsFx85N57Rj7BjqSI4j_sJ6NKIxr4vVKh2VShdQo

To claim this, I am signing this object:

( advice from @johnmyleswhite; ministorm starts with https://twitter.com/johnmyleswhite/status/766657182582513666 )

I keep planning on writing a post about contributing to OSS effectively, but I'm starting to doubt I ever will. So here's some tweets.

  1. Credibility is everything. People are busy, so they heavily use personal trust to inform their decisions. You must become credible.

  2. Credibility starts with technical competence, rather than shared aesthetics. Do not start contributing by engaging in design debates.

$ cat test.sh
#!/usr/bin/env bash
set -e
foo () {
echo $(echo "subshell foo"; exit 11)
}
bar () {
@eentzel
eentzel / Makefile
Created July 25, 2014 21:32
Makefile for python/virtualenv
PY_SRC:=$(shell find . -not -ipath '*/env/*' -name '*.py')
.PHONY: clean
clean:
git clean -Xdf
env/bin/python:
virtualenv env
env: env/bin/python requirements.txt
@eentzel
eentzel / jenkins.sh
Last active August 29, 2015 14:04
pip install over git when credentials are not installed in ~/.ssh
touch deployer_key
chmod 600 deployer_key
cat > deployer_key <<EOF
-----BEGIN RSA PRIVATE KEY-----
something something something
-----END RSA PRIVATE KEY-----
EOF
cat > sshwrap <<'EOF'
#!/bin/sh -x
# bash function
defcomp () {
local name="$1" && shift
local functionName="$( echo "${name}_completion" | tr - _ )"
source <(cat <<EOM
$functionName () {
local cur
_get_comp_words_by_ref -n =: cur
COMPREPLY=( \$(compgen -W "\$( $@ )" -- "\$cur") )
}
;; http://www.plope.com/Members/chrism/flymake-mode
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
#!/bin/sh
set -e
CREDENTIAL_FILE=~/.aws-creds
PROFILE_NAME=${1:-"default"}
SECTION=$(grep -A 3 "\[${PROFILE_NAME}\]" ${CREDENTIAL_FILE})
CREDENTIAL_LINES=$(echo "$SECTION" |
grep "^\(aws_access_key_id\|aws_secret_access_key\|region\)=")
@eentzel
eentzel / wait-for.clj
Last active December 12, 2015 02:38 — forked from mrowe/wait-for.clj
;; Based on a queue polling function from Chas Emerick's bandalore:
;; https://github.com/cemerick/bandalore/blob/master/src/main/clojure/cemerick/bandalore.clj#L124
(defn wait-for
"Invoke predicate every interval (default 10) seconds until it returns true,
or timeout (default 150) seconds have elapsed. E.g.:
(wait-for #(< (rand) 0.2) :interval 1 :timeout 10)
Returns nil if the timeout elapses before the predicate becomes true, otherwise
# more docs: http://ffmpeg.org/ffmpeg.html
FRAME_RATE=20
ffmpeg -r $FRAME_RATE -pattern_type glob -i "frame_*.png" anim.mp4