This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time, os, sys, signal | |
sleeptime = waketime = 0.01 | |
def send(signal, pids): | |
for pid in pids: | |
os.kill(pid, signal) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os, urllib, json | |
user = sys.argv[1] | |
u = urllib.urlopen('http://gist.github.com/api/v1/json/gists/' + user) | |
bytes = u.read() | |
u.close() | |
gistdir = user + '-gists' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# http://en.wikipedia.org/wiki/Lunar_phase#Calculating_phase | |
import math, decimal, datetime | |
dec = decimal.Decimal | |
def position(now=None): | |
if now is None: | |
now = datetime.datetime.now() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="notification-container" class=""> | |
<div id="notification"> | |
<span><a href="http://www.google.com/chromebook/index.html#utm_campaign=en&utm_source=en-ntp-holidays-na-us-bkws&utm_medium=ntp-holidays">Get a Chromebook for the holidays</a>: the computer powered by Chrome.</span> | |
<div id="notificationLinks"></div> | |
<button class="close-button"></button> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
773 ɪ | |
750 ə | |
547 n | |
489 t | |
480 ː | |
393 d | |
334 s | |
327 a | |
304 l | |
296 e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var link = document.createElement('link'); | |
link.rel = 'stylesheet'; | |
link.href = 'style.css'; | |
document.head.appendChild(link); | |
})(); | |
window.onload = function() { | |
document.body.innerHTML = document.body.innerHTML | |
.replace(/\n\n/g, '<p>') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
p_emphasis = ur'(?<!\\)\*(.+?)\*' | |
p_paragraph = ur'\A(?=\S)|(?<=\A\n)(?=\S)|(?<=\n\n)(?=\S)' | |
p_link = ur'(?s)(?<!\\)\*([^*]+)\*(\W?)(?:[^\S\n]+|\n(?!\n))+(\S*[./]\S+)' | |
r_link = re.compile(p_link) | |
r_emphasis = re.compile(p_emphasis) | |
r_paragraph = re.compile(p_paragraph) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import cgitb | |
cgitb.enable() | |
import sys, os, re, glob, datetime | |
def utf8ize(s): | |
nuggets = [] | |
for nugget in s.split(' '): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery Paginator v1.0 - 20 Aug 2011 | |
* Copyright 2011 Sean B. Palmer, Apache License 2.0 | |
* http://sbp.so/paginator | |
*/ | |
$(function () { | |
var body = $('body'); | |
var content = false; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head>…</head> | |
<body> | |
<h1>…</h1> | |
<p id="summary">…</p> | |
<section id="content">…</section> | |
</body> | |
</html> |