Skip to content

Instantly share code, notes, and snippets.

Schemas for encoding QR codes

URL

Url Scheme: https://example.com

Location

Geo Scheme: geo:37.33182,-122.03118

@johnsockwell
johnsockwell / draft.sh
Last active August 29, 2015 14:23
Git Managed Documentation
#!/bin/sh
#######################################################################
# Productivity helpers
draft(){
REPO_PATH=$HOME/working-documents/
FILE_NAME=tracked-$(date "+%s")
# Open file for editing
st -w "${REPO_PATH}${FILE_NAME}.md"
@johnsockwell
johnsockwell / curly.sh
Last active August 29, 2015 14:16
Curls a list of urls and displays the http response code. Great for APIs!
#!/bin/sh
while read URL
do
curl -sL -w "%{http_code} %{url_effective}\\n" -o /dev/null -# $URL
done < "${1:-/dev/stdin}"
@johnsockwell
johnsockwell / preseed
Last active December 4, 2015 05:13
Guide to creating a Vagrant base box with VirtualBox
#### Contents of the preconfiguration file (for jessie)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.
@johnsockwell
johnsockwell / VirtualBoxRawDisk
Last active August 29, 2015 14:10
Create a VirtualBox disk with raw access to a device on the host
echo -n "Enter device location: " && read DEVICE && sudo VBoxManage internalcommands createrawvmdk -filename ./host_device.vmdk -rawdisk $DEVICE && sudo chmod 777 $DEVICE && sudo chmod 777 ./sd-card.vmdk