Skip to content

Instantly share code, notes, and snippets.

# "impossible puzzle" as described at http://en.wikipedia.org/wiki/Impossible_Puzzle
# X inside 2..99
# Y inside 2..99
# P knows X * Y
# S knows X + Y
def every_pair():
for x in range(2,100):
@paulhodge
paulhodge / gist:1018351
Created June 10, 2011 06:53
failed cairo install, stdout
==> Downloading http://www.cairographics.org/releases/cairo-1.10.2.tar.gz
File already downloaded in /Users/andyfischer/Library/Caches/Homebrew
/usr/bin/tar xf /Users/andyfischer/Library/Caches/Homebrew/cairo-1.10.2.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.10.2 --with-x
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.10.2 --with-x
checking for gcc... /usr/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
@paulhodge
paulhodge / gist:1018355
Created June 10, 2011 06:54
failed cairo install, config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cairo configure 1.10.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.10.2 --with-x
## --------- ##
## Platform. ##
@paulhodge
paulhodge / gist:2770949
Created May 22, 2012 18:57
vim: open a file using the date as filename
" type :L to open a file at ~/notes/log/<current date>
fun! OpenLog()
let fname = strftime("%Y_%m_%d")
exe ":e ~/notes/log/" . fname
endfun
command L call OpenLog()
@paulhodge
paulhodge / gist:4019636
Created November 5, 2012 19:05
mitmproxy error log
~ $ python --version
Python 2.7.3
~ $ which python
/usr/local/bin/python
~ $ mitmproxy --version
mitmproxy 0.8
~ $ which mitmproxy
/usr/local/share/python/mitmproxy
~ $ pip freeze
PIL==1.1.7