Skip to content

Instantly share code, notes, and snippets.

@threedaymonk
threedaymonk / srutis.clj
Created August 16, 2012 00:00
Hacking Chris Ford's Overtone code to play Indian scales.
(ns noize.core
(:use [overtone.live :exclude [midi->hz sharp flat scale run pitch shift]]))
(definst harps# [freq 440]
(let [duration 1]
(*
(line:kr 1 1 duration FREE)
(pluck (* (white-noise) (env-gen (perc 0.001 5) :action FREE)) 1 1 (/ 1 freq) (* duration 2) 0.25))))
(def midi-0 8.1757989156)
#!/bin/sh
#
# gpgedit: edit an encrypted file with an associated list of recipients
#
# $ gpgedit secrets.gpg
#
# gpgedit needs the companion file "secrets.rcp" to exist, and contains a list
# of intended recipients, one per line. The recipient file can contain end-of-
# line comments, starting with the "#" character.
@jboner
jboner / latency.txt
Last active April 1, 2025 10:55
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@mtnygard
mtnygard / gist:2638441
Created May 8, 2012 18:49
Books I recommended today - May 8, 2012
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@jogojapan
jogojapan / simple-suffix-trees
Created April 20, 2012 05:58
A couple suffix trees in the Graphviz dot format
//
// These are dot graphs used for the little figures in some
// of my suffix-tree related posts on Stackoverflow, in
// particular:
//
// http://stackoverflow.com/a/9513423/777186
//
// To use them, simply apply the "dot" program to this file.
// For example, to generate a PNG image:
//
@tonymorris
tonymorris / ReaderWriterStateT.scala
Created April 11, 2012 16:59
Reader/Writer/State transformer in Scala
case class ReaderWriterStateT[R, W, S, F[_], A](
run: (R, S) => F[(W, A, S)]
) {
def map[B](f: A => B)(implicit F: Functor[F])
: ReaderWriterStateT[R, W, S, F, B] =
ReaderWriterStateT {
case (r, s) => F.map(run(r, s)) {
case (w, a, s) => (w, f(a), s)
}
}
@garethr
garethr / gist:2336682
Created April 8, 2012 11:19
Government Digital Service - Web Operations Role

We're looking for systems administrators and software developers of all levels interested in a predominantly web operations role. You will...

  • Work with developers to optimise existing application and to design new ones
  • Support production web applications and infrastructure
  • Participate in stand-ups, planning sessions and retrospectives
  • Design, build and run systems for application deployment, systems orchestration and configuration management
  • Encourage everyone (developers, delivery managers, product owners) to think about how new applications will be run and maintained
  • Be an integral part of growing a multi-disciplinary operations team
  • Contribute to designing internal processes needed in the running of a high performance development and operations organisation

Adrian -

I appreciate that you spent time in writing this post. I know I've been up until 2am writing similarly long ones as well. I will take responsibility for having what is likely an irrational response (I blame Twitter for that) to the term "NoOps", but I invite you to investigate why that might be. I'm certainly not the only one who feels this way, apparently, and thus far have decided this issue is easily the largest distraction in my field I've encountered in recent years. I have had the option to simply ignore my opposition to the term, and just let the chips fall where they may with how popular the term "NoOps" may or may not get. I have obviously not taken that option in the past, but I plan to in the future.

You're not an analyst saying "NoOps". Analysts are easy (for me) to ignore, because they're not practitioners. We have expectations of engineering maturity from practitioners in this field of web engineering, especially those we consider leaders. I don't have any expectations from analysts,

@peterc
peterc / code2png.rb
Created February 19, 2012 00:32
code2png - Render code to an image on OS X
#!/usr/bin/env ruby
# code2png - Render code to an image on OS X
# Peter Cooper (@peterc)
# MIT license
#
# code2png converts source code into a PNG graphic
# (with syntax coloring, if you want). Ideal for
# Kindle document production, RSS feeds, etc.
#