This is available at: gist
- Download image from http://www.raspberrypi.org/downloads/
- Check where the SD card is mounted
df -h
- Unmount SD card
diskutil unmountDisk /dev/disk2
// HTTP server which periodically emits a message, in this case, "💩 ". | |
// | |
// Idea taken from http://robpike.io/ | |
// Test with: curl -i -N http://localhost:8080 | |
package main | |
import ( | |
"fmt" | |
"io" |
This is available at: gist
df -h
diskutil unmountDisk /dev/disk2
# Add this to ~/.ssh/config, changing the Host and IdentifyFile definitions as needed. | |
# Run `vagrant ssh-config` for more info. | |
Host devbox | |
HostName 127.0.0.1 | |
User vagrant | |
Port 2222 | |
ForwardAgent yes | |
IdentityFile ~/vms/devbox/.vagrant/machines/default/virtualbox/private_key | |
UserKnownHostsFile /dev/null |
go test -run none -bench . -benchtime 3s -benchmem | |
testing: warning: no tests to run | |
PASS | |
BenchmarkAlgorithmOne-8 2000000 2590 ns/op 53 B/op 2 allocs/op | |
BenchmarkAlgorithmTwo-8 5000000 957 ns/op 0 B/op 0 allocs/op | |
BenchmarkAlgorithmThree-8 3000000 1470 ns/op 16 B/op 1 allocs/op | |
BenchmarkAlgorithmFour-8 2000000 1907 ns/op 1 B/op 1 allocs/op | |
BenchmarkAlgorithmFive-8 2000000 2026 ns/op 1 B/op 1 allocs/op | |
BenchmarkAlgorithmSix-8 2000000 2177 ns/op 16 B/op 1 allocs/op | |
BenchmarkAlgorithmSeven-8 2000000 1878 ns/op 176 B/op 3 allocs/op |
#!/usr/bin/env bash | |
set -eu | |
# Proof-of-concept script to demonstrate using an AppRole | |
# generated token for the kubernetes-vault controller. | |
# https://github.com/Boostport/kubernetes-vault | |
# Expects vault local development server to be running. | |
# Launch with: | |
# vault server -dev |
package main | |
// Duplicate image detector. | |
// | |
// Usage: | |
// ./dupimgs -dir . | |
// | |
// This will recursively search the given directory for files with | |
// {.jpg, .jpeg} extensions (currently hardcoded). For each file with | |
// such an extension, the MD5 hash of the file's contents will be calculated. |