Skip to content

Instantly share code, notes, and snippets.

Traceback (most recent call last):
File "/Users/cormac/Dropbox/Code/aspen/bin/aspen", line 9, in <module>
load_entry_point('aspen==0.22.22', 'console_scripts', 'aspen')()
File "/Users/cormac/Dropbox/Code/aspen/lib/python3.3/site-packages/distribute-0.6.31-py3.3.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/cormac/Dropbox/Code/aspen/lib/python3.3/site-packages/distribute-0.6.31-py3.3.egg/pkg_resources.py", line 2334, in load_entry_point
return ep.load()
File "/Users/cormac/Dropbox/Code/aspen/lib/python3.3/site-packages/distribute-0.6.31-py3.3.egg/pkg_resources.py", line 2040, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Users/cormac/Dropbox/Code/aspen/lib/python3.3/site-packages/aspen/__init__.py", line 12, in <module>
import webbrowser
import urllib
import clipboard
import notification
import time
# get a newline-separated list of tasks from the clipboard
tasks = clipboard.get().split("\n")
# url quote the strings
@cormacrelf
cormacrelf / writing.md
Last active December 14, 2015 03:39
Just a test, using Gist so I can see how it compares with draftin.com

The pineapple woke one day to find that he was falling down steps. His heavy, juicy body bounced on the gritty concrete, his spines being smushed, and juice leaked from his head. He rolled, and rolled - until he reached the bottom. He lay, resting on a cold dime, not aware of the fact that it was almost night-time.

Ok, first of all we add two lines here. Then we go back up and change a few words, and hope Gist shows a word diff.

@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.
@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 / 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
.highlight {
padding: 10px;
overflow: scroll;
}
code {
font-weight: normal;
background: none; /* This part is important. */
}
@cormacrelf
cormacrelf / gist:4193881
Created December 3, 2012 09:35
test for blog?
def hello
puts :hello_world
end
@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: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 $$