Skip to content

Instantly share code, notes, and snippets.

tmpdir=tmp
if [ -d "$tmpdir" ]; then
rm -rf $tmpdir
fi
mkdir $tmpdir
height=2592
width=10
n=0
for f in *.jpg
do

Coming from the 21st Century

Peanut butter cups

Chocolate + sugar + peanut butter. A winning combination throughout the ages. Even people who can't understand your language can immediately determine the value of a peanut butter cup. It's Prime Directive friendly (difficult to reproduce and unlikely to affect the course of other recipes), consumable (fewer twonky problems), cheap enough (for the traveler) to give to a child for a quick bit of information, and valuable enough (to the local) to barter for items of immense value.

350-Farad capacitors

(idea from @wikkit on Twitter) A 350-Farad capacitor is small enough to fit in the hand and available for $11. An electrical engineer from the mid-1800s to mid 20th C would easily be able to verify it and would value it highly.

@n8foo
n8foo / pre-commit
Created December 5, 2013 21:48 — forked from fluxrad/pre-commit
#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit
# Source RVM if needed
alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
base = len(alphabet)
def b58enc(div, s=''):
if div >= base:
div, mod = divmod(div, base)
return b58enc(div, alphabet[mod] + s)
return alphabet[div] + s
def b58dec(s):

Keybase proof

I hereby claim:

  • I am n8foo on github.
  • I am n8foo (https://keybase.io/n8foo) on keybase.
  • I have a public key whose fingerprint is 3855 194E 906B EA29 5F2E 030F CB01 D733 1ACF 1E3A

To claim this, I am signing this object:

@n8foo
n8foo / image_reload.js
Created June 27, 2014 00:57
javascript snippit to reload all the images on a page
setInterval(function() {
var images = document.images;
for (var i=0; i<images.length; i++) {
images[i].src = images[i].src.replace(/\btime=[^&]*/, 'time=' + new Date().getTime());
}
}, 10000); // 10000 milliseconds = 10 seconds
@n8foo
n8foo / setup.sh
Created August 10, 2014 03:57
RPI SDR Install Instructions
# Install dependencies
sudo apt-get update
sudo apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake libpulse-dev libx11-dev
# Fetch and compile rtl-sdr source
mkdir -p ~/src/
cd ~/src/
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
  • Long Tail Video
  • Macromedia
  • BMW
  • BMW Motorcycles
  • BMW Xplor
  • ASPSeek
  • Foursquare
  • Speedyclick
  • Model Mayhem
  • Tugg Inc (via Why We Ride mailing list)
@n8foo
n8foo / openssl_shortcuts.sh
Created April 17, 2015 02:56
openssl shortcuts
# check date of certificate on remote site
echo | openssl s_client -connect ssl.example.com:443 | openssl x509 -noout -dates
@n8foo
n8foo / allmovies.txt
Last active February 8, 2016 14:04
get a list of all movies as known by wikipedia
Less Than Zero
Zero Charisma
Zero Dark Thirty
Zero Day
Zero Effect
Zero for Conduct
Zero Hour!
Zero Tolerance
The $1,000,000 Reward
One Hundred Men and a Girl