Skip to content

Instantly share code, notes, and snippets.

==> 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
@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}
@cormacrelf
cormacrelf / gist:3760445
Created September 21, 2012 08:50
input.md

Cormac Relf

$$x=25\sqrt{3}$$

puts "string" + 56.hello(thing: true)

$$ m g h = \frac{1}{5} m v^2 + \frac{1}{5} m v^2 + heat $$

@cormacrelf
cormacrelf / gist:4139446
Created November 24, 2012 12:20
AppFog Wordpress logs
====> /logs/access.log <====
10.0.64.41 - - [24/Nov/2012:12:13:31 +0000] "GET / HTTP/1.0" 200 318 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"
====> /logs/error.log <====
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Nov 24 12:13:14 2012] [warn] pid file /var/vcap.local/dea/apps/geoff-0-f305bf0d2c89dbe1c542fbf878be0321/run.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 24 12:13:14 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.2 with Suhosin-Patch configured -- resuming normal operations
@cormacrelf
cormacrelf / gist:4193881
Created December 3, 2012 09:35
test for blog?
def hello
puts :hello_world
end
.highlight {
padding: 10px;
overflow: scroll;
}
code {
font-weight: normal;
background: none; /* This part is important. */
}
@cormacrelf
cormacrelf / OpenURL.py
Created January 20, 2013 13:35
open url in safari from pythonista
# a bit of a hack
# by Cormac Relf - cormacrelf.com - @cormacrelf
# Opens the url on the clipboard in Safari
# by opening Google Chrome with an x-callback-url
# that takes you to the same url in Safari.
# I guess you could just open it in googlechrome://
import webbrowser
@cormacrelf
cormacrelf / things_parsedate.py
Last active July 25, 2016 00:40
Parse a natural language date and use that as the due date for a new Things task. Depends on https://gist.github.com/4583376
# Date parsing for Things
# by Cormac Relf - cormacrelf.com - @cormacrelf
# depends on parsedatetime
# use the .py files extracted from v0.8.7 from here: https://gist.github.com/4583376
# alternatively:
# download pipista; https://gist.github.com/4116558
# in the plain Pythonista console, type `import pipista`, then `pipista.pypi_download("parsedatetime")`
# download shellista; https://gist.github.com/4139094
# running shellista, enter the following commands, which have been shortened for your convenience:
@cormacrelf
cormacrelf / parsedatetime.py
Created January 21, 2013 03:13
parsedatetime module in gist form.
#!/usr/bin/env python
"""
Parse human-readable date/time text.
"""
__license__ = """
Copyright (c) 2004-2008 Mike Taylor
Copyright (c) 2006-2008 Darshana Chhajed
All rights reserved.