I hereby claim:
- I am danielwhite on github.
- I am daniel_white (https://keybase.io/daniel_white) on keybase.
- I have a public key ASCxt1nQXX1VbdAcm5c-DF_5_y_Ul8YN56BQt1bC-WYuOwo
To claim this, I am signing this object:
FROM debian:latest | |
# Add Mopidy repository | |
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 78FD980E271D2943 && \ | |
echo "deb http://apt.mopidy.com/ jessie main contrib non-free" > /etc/apt/sources.list.d/mopidy.list | |
# Install Mopidy packages | |
RUN apt-get update && apt-get install -y \ | |
mopidy \ | |
mopidy-spotify \ |
#!/bin/bash | |
# | |
# Generate benchmark files in a Git repository. | |
# | |
# Usage: TIMES=1 go-bench [prefix] | |
# | |
# Number of times to run the benchmark; useful for benchstat. | |
TIMES=${TIMES:-1} |
#!/bin/bash | |
# | |
# This script finds incoming PR branches from a GitHub based remote. | |
# | |
# Example | |
# | |
# $ git checkout -b incoming origin/master | |
# $ git incoming origin | xargs git merge | |
# |
package math | |
// Average returns the floor of the average of two signed integers without risk of overflow. | |
// | |
// See: http://aggregate.org/MAGIC/#Average%20of%20Integers | |
func Average(x, y int64) int64 { | |
return (x & y) + ((x ^ y) >> 1) | |
} |
I hereby claim:
To claim this, I am signing this object:
PACKAGE ?= lambda.zip | |
HANDLER ?= main | |
all: $(PACKAGE) | |
.PHONY: clean | |
clean: | |
rm -f $(PACKAGE) | |
$(PACKAGE): $(HANDLER) |
package main_test | |
import ( | |
"testing" | |
) | |
/* | |
This is an example implementation of a golden file test that is easy to update. | |
*/ |
This captures notes around problems I encountered while working through R for Data Scientists.
On OSX, the installation of xml2
fails with an error:
Configuration failed because libxml-2.0 was not found.
#!/bin/bash | |
set -euo pipefail | |
# | |
# Tidies up the remote and local references of a Git repository. | |
# | |
# By default, it assumes that origin/master is the mainline branch. | |
# | |
GIT_UPSTREAM_REMOTE=${GIT_UPSTREAM_REMOTE:-origin} |
/* | |
Create a string usage a web-safe version of the specified background color. | |
The foreground will be set to an inverse color for legibility. | |
Untested and definitely broken. | |
*/ | |
func decorate(bgColor color.Color, s string) string { | |
fgColor := inverse(bgColor) |