Skip to content

Instantly share code, notes, and snippets.

@cormacrelf
cormacrelf / gist:3760427
Created September 21, 2012 08:45
Pandoc Markdown -> latex with syntax highlighting
\documentclass[]{article}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
\else
\ifluatex
\usepackage{fontspec}
==> Downloading http://www.clifford.at/stfl/stfl-0.22.tar.gz
Already downloaded: /Library/Caches/Homebrew/libstfl-0.22.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/libstfl-0.22.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file Makefile
patching file perl5/Makefile.PL
patching file python/Makefile.snippet
patching file ruby/Makefile.snippet
patching file stfl.pc.in
==> Downloading http://www.clifford.at/stfl/stfl-0.22.tar.gz
Already downloaded: /Library/Caches/Homebrew/libstfl-0.22.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/libstfl-0.22.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file Makefile
patching file perl5/Makefile.PL
patching file python/Makefile.snippet
patching file ruby/Makefile.snippet
patching file stfl.pc.in

Fun fun fun!

I am here.

@cormacrelf
cormacrelf / gist:2848970
Created June 1, 2012 05:04
Count to a small integer!
>,<++++++[>--------<-]>
[>>+<<-]
+++++++
[>+++++++<-]
>>[<.+>-]
<[-]
==> Downloading http://ftpmirror.gnu.org/mit-scheme/stable.pkg/9.0.1/mit-scheme-c-9.0.1.tar.gz
Already downloaded: /Users/cormac/Library/Caches/Homebrew/mit-scheme-9.0.1.tar.gz
/usr/bin/tar xf /Users/cormac/Library/Caches/Homebrew/mit-scheme-9.0.1.tar.gz
==> etc/make-liarc.sh --disable-debug --prefix=/usr/local/Cellar/mit-scheme/9.0.1 --mandir=/usr/local/Cellar/mit-scheme/9.0.1/share/man
etc/make-liarc.sh --disable-debug --prefix=/usr/local/Cellar/mit-scheme/9.0.1 --mandir=/usr/local/Cellar/mit-scheme/9.0.1/share/man
run_cmd: ./configure --prefix=/private/tmp/homebrew-mit-scheme-9.0.1-gN1X/mit-scheme-c-9.0.1/src/boot-root --enable-native-code=c --disable-host-scheme-test
checking whether make sets $(MAKE)... yes
checking build system type... i386-apple-darwin11.3.0
checking host system type... i386-apple-darwin11.3.0
checking for gcc... /usr/bin/clang
#!/bin/zsh
# Usage: copy-rtf [file]
#
# Copies Pygmentize's RTF output of a source file to the clipboard after making it 36pt Monaco.
#
# Copy straight into an "Auto-Shrink" text box in Keynote for efficient code highlighting in a Coding presentation.
# Depends on [Pygments](http://pygments.org/) being installed in your $PATH...
# try `gem install pygmentize` for a standalone Ruby installation.
#!/bin/zsh
# Usage: copy-rtf [file]
#
# Copies Pygmentize's RTF output of a source file to the clipboard after making it 36pt Monaco.
#
# Copy straight into an "Auto-Shrink" text box in Keynote for efficient code highlighting in a Coding presentation.
# Depends on [Pygments](http://pygments.org/) being installed in your $PATH...
# try `gem install pygmentize` for a standalone Ruby installation.
@cormacrelf
cormacrelf / gist:2224299
Created March 28, 2012 06:37
Crash every time I launch, within 4 seconds.
Process: Cloud [3000]
Path: /Applications/Cloud.app/Contents/MacOS/Cloud
Identifier: com.linebreak.CloudAppMacOSX
Version: 1.5.3 (1.5.3)
App Item ID: 417602904
App External ID: 4781889
Code Type: X86-64 (Native)
Parent Process: launchd [214]
Date/Time: 2012-03-28 17:36:07.342 +1100
stoichiometry:
m_origin = 8.5e7 g
M_origin = 55.845
origin = 2
target = 3
M_target = 28
Target mass: m_target = m_origin/M_origin * target/origin * M_target