Skip to content

Instantly share code, notes, and snippets.

@doubleotoo
doubleotoo / build_gcc_4.7_on_mac.sh
Created June 13, 2012 22:57 — forked from mtholder/build_gcc_4.7_on_mac.sh
Script to download and build gcc 4.7 and its dependencies on mac - it took about 40 minutes on my machine (and the "make check" in the gcc build failed for lack of an "autogen" script"), but the compiler seems to work.
#!/bin/sh
# You might want to modify the first line to specify your own install location.
# In theory the rest should not need tweaking...
export GCC_PREFIX="$HOME/gcc4.7"
# Hopefully, you can tweak these as they get out of date, but the download URL's
# may not be stable to text substitution.
GMP_DOWNLOAD_VERSION=gmp-5.0.5
MPFR_DOWNLOAD_VERSION=mpfr-3.1.0
MPC_DOWNLOAD_VERSION=mpc-0.8.2
require 'digest/md5'
def gfm(text)
# Extract pre blocks
extractions = {}
text.gsub!(%r{<pre>.*?</pre>}m) do |match|
md5 = Digest::MD5.hexdigest(match)
extractions[md5] = match
"{gfm-extraction-#{md5}}"
end
@doubleotoo
doubleotoo / christ.txt
Created May 10, 2012 18:33 — forked from natlownes/christ.txt
git pre-receive hook to catch Ruby debugger statements and reject push
.======.
| INRI |
| |
| |
.========' '========.
| _ xxxx _ |
| /_;-.__ / _\ _.-;_\ |
| `-._`'`_/'`.-' |
'========.`\ /`========'