Skip to content

Instantly share code, notes, and snippets.

@n8foo
n8foo / gist:2439647
Created April 21, 2012 21:18
nashvl.org GA code
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-31087507-1']);
_gaq.push(['_setDomainName', 'nashvl.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
@n8foo
n8foo / es.sh
Created April 25, 2012 22:32 — forked from kajic/es.sh
Install ElasticSearch on Ubuntu 10.04/11.04
cd ~
sudo apt-get update
sudo apt-get install curl python-software-properties -y
sudo apt-get install openjdk-6-jre-headless
curl -L https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz | tar -xz
sudo mv elasticsearch-* /usr/local/share/elasticsearch
curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz
sudo mv *servicewrapper*/service /usr/local/share/elasticsearch/bin/
rm -Rf *servicewrapper*
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@n8foo
n8foo / class.pp
Created November 14, 2012 20:32
puppet user.pp example
define add_user ( $email, $uid, $name, $key) {
$username = $title
user { $username:
comment => "$name,$email",
home => "/home/$username",
shell => "/bin/bash",
uid => $uid
}
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
#! /bin/bash
find /var/lib/puppet/clientbucket -name paths -exec ls -la {} \; -exec cat {} \; | grep -B 1 $1
@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
  • Long Tail Video
  • Macromedia
  • BMW
  • BMW Motorcycles
  • BMW Xplor
  • ASPSeek
  • Foursquare
  • Speedyclick
  • Model Mayhem
  • Tugg Inc (via Why We Ride mailing list)