Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@boneskull
boneskull / bbb.yml
Last active June 3, 2021 11:26
Ansible Playbook for Configuring BeagleBone Black on Debian (wheezy) from MacOS X 10.10.x w/ setup for Edimax EW-7811Un
# CHANGELOG
# 3/22/15:
# - updated keyring
#
# To setup ansible on Mac:
# brew install ansible
# mkdir -p /usr/local/etc/ansible
# mkdir -p /usr/local/share/ansible
#
# To run:
/**
* Written by Gil Tene of Azul Systems, and released to the public domain,
* as explained at http://creativecommons.org/publicdomain/zero/1.0/
*/
package org.HdrHistogram;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.locks.ReentrantLock;
@acolyer
acolyer / service-checklist.md
Last active January 30, 2024 17:39
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@bdd
bdd / gcb
Last active December 29, 2015 07:29 — forked from evnm/gcb
a shorter, faster and a bit more helpful version of gcb.sh
#! /bin/sh
match=`git rev-parse --abbrev-ref --branches="*$1*"`
case `wc -w <<< "$match" | tr -d ' '` in
"0") echo "error: '$1' did not match any branch." 2>&1 ;;
"1") git checkout $match ;;
*) echo "error: '$1' is ambigious among:\n$match" 2>&1
esac
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@igrigorik
igrigorik / README.md
Last active December 10, 2015 02:48
Home router latency (Linksys E1550) - quick test.

Quick, take a guess, what's the first hop latency to your home wireless router?

Below 1ms, right? Yeah, you wish!

Below are results from a quick test on my home router (Linksys E1550). Some lessons learned:

  • 3-8ms median
  • very different latency tails on different channels (1,6,11)
  • running in mixed mode helps tame the long tails (do it, if you can)
  • all tests on 2.4Ghz, unfortunately E1550 can't do 5Ghz
@marcel
marcel / gist:2100703
Created March 19, 2012 07:24
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
@imownbey
imownbey / gist:1408068
Created November 30, 2011 04:50
Fuck yeah
ruby -e "require 'rubygems'; require 'open-uri'; require 'rss'; require 'cgi'; puts CGI.unescapeHTML(RSS::Parser.parse(open('http://www.rapquote.com/rss')).items.last.description).gsub('<br/>', \"\\n\").gsub(/<(\\/?)\\w+>/i, '').gsub('“', '\"').gsub('”', '\"').gsub('’', '\'').gsub(' ', ' ')" | cowsay -g | lolcat
_________________________________________
/ "Used to have a crush on Dawn from En \
| Vogue. |
| |
| It's not like honey dip would wanna get |
| with me, |
| |
| But just in case I own more condoms |
| than TLC." |
@davist11
davist11 / gist:1204569
Last active January 19, 2024 15:03
Campfire sounds
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
butts: ":open_hands: :smoking:"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
cottoneyejoe: ":notes::hear_no_evil::notes:"
crickets: "hears crickets chirping"
dadgummit: "dad gummit!! :fishing_pole_and_fish:"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"