Skip to content

Instantly share code, notes, and snippets.

@n8foo
n8foo / ec2-metadata.sh
Created May 29, 2012 21:45
ec2-metadata
#!/bin/bash
#
#########################################################################
#This software code is made available "AS IS" without warranties of any #
#kind. You may copy, display, modify and redistribute the software #
#code either by itself or as incorporated into your code; provided that #
#you do not remove any proprietary notices. Your use of this software #
#code is at your own risk and you waive any claim against Amazon #
#Digital Services, Inc. or its affiliates with respect to your use of #
#this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its #
@n8foo
n8foo / curl_stats.sh
Created March 1, 2012 16:40
Curl Stats Command
#! /bin/bash
curl -L --output /dev/null --write-out "http_code:%{http_code} http_connect:%{http_connect} time_total:%{time_total} time_namelookup:%{time_namelookup} time_connect:%{time_connect} time_appconnect:%{time_appconnect} time_pretransfer:%{time_pretransfer} time_redirect:%{time_redirect} time_starttransfer:%{time_starttransfer} size_download:%{size_download} size_upload:%{size_upload} size_header:%{size_header} size_request:%{size_request} speed_download:%{speed_download} speed_upload:%{speed_upload} content_type:%{content_type} num_connects:%{num_connects} num_redirects:%{num_redirects}\n" --silent $1
var days31 = ["label1",
"label2",
"label3"];
var days7 = ["parent/label4",
"parent/label5",
"parent/label6",
"label7"];
function auto_delete_mail(userLabel,days) {
@n8foo
n8foo / fabfile.py
Created July 19, 2016 21:59
example python fabric task
#! /bin/env/python
from fabric.api import *
env.use_ssh_config=True
env.roledefs = {
'all': [
'host1',
'host2',
@n8foo
n8foo / apt-get-update.yml
Last active July 19, 2016 21:55
Example basic ansible playbook
---
- hosts: hostgroup1
sudo: yes
serial: 3
tasks:
- shell: apt-get -y update
- shell: apt-get -y upgrade
  • Long Tail Video
  • Macromedia
  • BMW
  • BMW Motorcycles
  • BMW Xplor
  • ASPSeek
  • Foursquare
  • Speedyclick
  • Model Mayhem
  • Tugg Inc (via Why We Ride mailing list)
@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
#! /bin/bash
find /var/lib/puppet/clientbucket -name paths -exec ls -la {} \; -exec cat {} \; | grep -B 1 $1
@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

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.