I hereby claim:
- I am dansimau on github.
- I am dansimau (https://keybase.io/dansimau) on keybase.
- I have a public key ASBxOKX07kpA124KgQBfA2hD23-v7xTfi0EdIv45ePiv8wo
To claim this, I am signing this object:
#!/bin/bash | |
# | |
# A bash script/template for adding multi-processing to "stuff". | |
# | |
# Designed to be used for syncing files though. Takes "strings of stuff" (eg. | |
# filenames) into a queue, flattens duplicates, then spawns a worker after a | |
# few seconds that calls the processing script with the "stuff" as params. | |
# | |
# dsimmons@squiz.co.uk | |
# 2011-02-24 |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
""" | |
Report branches or commits that are not yet merged into master. | |
""" | |
import subprocess | |
from os.path import basename | |
# Merge/environment branches. These will be excluded from the | |
# "unmerged branches" list. | |
EXCLUDE_BRANCHES = ['staging', 'uat', 'production', 'master'] |
""" | |
Takes a list of JSON files from Google Takeout's "Maps (Your Places)" and | |
converts them into KML documents. | |
""" | |
import json | |
import os | |
import simplekml | |
import sys | |
import unicodedata | |
import xml.sax.saxutils |
# | |
# "<cmd>" <retry times> <retry wait> | |
# | |
do_retry() | |
{ | |
cmd="$1" | |
retry_times=$2 | |
retry_wait=$3 | |
c=0 |
# | |
# Change to the directory of the specified Go package name. | |
# | |
gg() { | |
paths=($(g "$@")) | |
path_index=0 | |
if [ ${#paths[@]} -gt 1 ]; then | |
c=1 |
#!/bin/bash | |
# | |
# Show replication lag for one or more postgresql slaves in streaming replication. | |
# | |
# dsimmons@squiz.co.uk | |
# 2012-01-09 | |
# | |
psql="which psql" | |
psql_extra_opts="" |
#!/bin/bash | |
# | |
# Runs `go test -v`, parses the output and only displays errors. Also displays | |
# a summary of tests passed/failed/skipped/etc. | |
# | |
set -o pipefail | |
declare buffer= | |
declare test_error=false |
set the RGB16bit_list to (choose color) | |
-- convert choosen color to HEX | |
set the formatedColor to my RBG_to_HEX(RGB16bit_list) | |
set the clipboard to formatedColor | |
display dialog "HEX colour value (" & formatedColor & ") has been copied to the clipboard." with icon 1 buttons {"Dismiss"} default button {"Dismiss"} giving up after 10 | |
on RBG_to_HEX(RGB_values) | |
-- this subroutine was taken from "http://www.apple.com/applescript/sbrt/sbrt-04.html" | |
set the hex_list to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"} |
#!/bin/bash | |
# | |
# Same as `go get` but you can specify a git commit ref. | |
# | |
set -e | |
# | |
# Resolve the path to the Go workspace from GOPATH. | |
# | |
_go_workspace() { |