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
# 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 |
This is available at: gist
df -h
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" |
#!/usr/bin/env bash | |
# ARG1 = remote host, ie db.example.com | |
# ARG2 = port to forward, ie 8080 | |
set -eu | |
echo "Tunneling $1 -> http://sshtunnel:$2" | |
#open /Applications/Google\ Chrome.app/ "http://sshtunnel:$2/" | |
ssh -C $1 -L $2:localhost:$2 -N |
#!/usr/bin/env bash | |
set -o pipefail | |
set -o errexit | |
# set -o xtrace | |
__DIR__="$(cd "$(dirname "${0}")"; echo $(pwd))" | |
__BASE__="$(basename "${0}")" | |
__FILE__="${__DIR__}/${__BASE__}" |
# | |
# Benchmark Restfulness::Sanitizer#sanitize_query_string | |
# Usage: ruby -I lib bm.rb 1000 | |
# | |
require 'benchmark' | |
require 'restfulness' | |
iterations = ARGV.empty? ? 1000 : ARGV.shift.to_i | |
query_string = "alongparam=das3e23&something=dfasd&password=caca&another=false" |