Skip to content

Instantly share code, notes, and snippets.

def powers_each(line, power)
replacement = []
line.each do |number|
replacement << number ** power
end
replacement
end
def powers_inject(line, power)
@littleidea
littleidea / haskell-mtn-lion.sh
Created August 5, 2012 15:52 — forked from dysinger/haskell-mtn-lion.sh
Install Haskell from Scratch
#!/bin/bash -eux
ARCH=${ARCH:-i386}
CORES=$(sysctl -n hw.ncpu)
GHC=${GHC:-7.4.2}
CABAL=${CABAL:-0.14.0}
PLATFORM=${PLATFORM:-2012.2.0.0}
[[ ! -d /usr/local/src ]] && mkdir -p /usr/local/src
@littleidea
littleidea / gist:3196364
Created July 29, 2012 06:22 — forked from danparsons/gist:3195652
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.