I hereby claim:
- I am RichardHyde on github.
- I am richardhyde (https://keybase.io/richardhyde) on keybase.
- I have a public key whose fingerprint is 0613 FD8F CAD4 DB02 A8F9 9544 2C9F 9316 06A2 8316
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class FixedOffset(tzinfo): | |
"""Fixed offset in minutes east from UTC.""" | |
def __init__(self, offset, name): | |
self.__offset = timedelta(minutes=offset) | |
self.__name = name | |
def utcoffset(self, dt): | |
return self.__offset | |
def tzname(self, dt): | |
return self.__name | |
def dst(self, dt): |
-- Convert date function. Call with string in YYYY-MM-DD HH:MM:SS format (time part optional) | |
to convertDate(textDate) | |
set resultDate to the current date | |
set the month of resultDate to (1 as integer) | |
set the day of resultDate to (1 as integer) | |
set the year of resultDate to (text 1 thru 4 of textDate) | |
set the month of resultDate to (text 6 thru 7 of textDate) | |
set the day of resultDate to (text 9 thru 10 of textDate) | |
set the time of resultDate to 0 |
javascript:var str = %27[%27+document.title+%27](%27+document.URL+%27)%27;prompt("Copy...",str); |
import sublime, sublime_plugin | |
import urllib, webbrowser | |
class PostToDayOneCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
selections = self.view.sel() | |
selection = self.view.substr(selections[0]) | |
url = "dayone://post?entry=%s" % urllib.quote(selection) |
tell application "Evernote" | |
activate | |
set note1 to create note from file theFile notebook {"Notebook Name"} tags {"tag1", "tag 2", "tag 3", "tag 4"} | |
open note window with note1 | |
end tell |
tell application "OmniFocus" | |
tell front document | |
set theContext to first flattened context where its name = "Tesco" | |
set theProject to first flattened project where its name = "Groceries Shopping" | |
set txt to (read (POSIX file "/users/rjhyde/Dropbox/Documents/groceries.txt") as «class utf8») | |
set gitems to every paragraph of txt | |
repeat with gitem in gitems | |
if (length of gitem) > 0 then | |
tell theProject to make new task with properties {name:gitem, context:theContext} |
#!/usr/bin/python | |
from string import maketrans | |
from sys import stdin, stdout | |
alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
rot13 = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM' | |
r13table = maketrans(alpha, rot13) | |
orig = stdin.read() | |
stdout.write(orig.translate(r13table)) |