Skip to content

Instantly share code, notes, and snippets.

View djui's full-sized avatar

Uwe Dauernheim djui

View GitHub Profile
@djui
djui / jira2branch.sh
Created August 29, 2012 20:52 — forked from andreineculau/jira2branch.sh
JIRA ticket to branch name
#!/bin/bash -e
# Usage # copy from browser "JIRA-205\nTicket title"
# $ jira2branch # echoes jira-205-ticket-title
# $ jira2branch team # echoes jira-205-team-ticket-title
OS=`uname`
function paste() {
if [ $OS == "Darwin" ]; then
@djui
djui / jira2branch.sh
Created August 29, 2012 20:52 — forked from andreineculau/jira2branch.sh
JIRA ticket to branch name
#!/bin/sh
case $(uname) in
"Linux") S=$(xclip -o);;
"Darwin") S=$(pbpaste -prefer txt);;
esac
python -c "
import sys,re;
F = sys.argv[2].split('\n');
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix.
;;
;; * :use makes functions available without a namespace prefix
;; (i.e., refers functions to the current namespace).
;;
;; * :import refers Java classes to the current namespace.
;;
(require '[com.keminglabs.zmq-async.core :refer [register-socket!]]
'[clojure.core.async :refer [>! <! <!! >!! go chan sliding-buffer close!]])
(let [addr "tcp://*:9999"
[s-in s-out] (repeatedly 2 #(chan (sliding-buffer 64)))]
(register-socket! {:in s-in :out s-out :socket-type :rep
:configurator (fn [socket] (.bind socket addr))})
(println "waiting messages...")
@djui
djui / gtb
Last active August 29, 2015 14:07 — forked from dschuetz/gtb
#!/usr/bin/python
import hmac, struct, time, base64, hashlib # for totp generation
import re, sys, subprocess # for general stuff
from getopt import getopt, GetoptError # pretending to be easy-to-use
#
# gtb - Google(auth) + Tunnelblick
#
// Generated music inspired by https://www.youtube.com/watch?v=MqZgoNRERY8
//
// First you need to install SoX: brew install sox
//
// go run music.go | play -c 1 -b 8 -e unsigned -t raw -r 22k -
package main
import "fmt"