This file contains 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
def make_slug(text) | |
text.downcase.split.map{ |w| w.delete '^a-z0-9' }.reject(&:empty?).join('-') | |
end |
This file contains 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
A Python class for filtering a set of English words. | |
Wildcard patterns are read from a file named ignore.txt. | |
Requires the CLiPS Pattern library: http://www.clips.ua.ac.be/pages/pattern |
This file contains 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
Requires shakespeare_sonnets.json from https://github.com/dariusk/corpora | |
python transform_data.py > lines.txt | |
python creep.py |
This file contains 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
#!/bin/sh | |
set -o errexit | |
set -o nounset | |
git symbolic-ref -q HEAD 2> /dev/null && { | |
echo 'error: a git repository already exists' | |
exit 1 | |
} | |
git init | |
git commit -m Init --allow-empty | |
git branch develop master |
This file contains 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
$ python secret123.py | |
f3M8VZEHb2/VAuKJScJAMYNuiawQr8q2^%s+K@ShK2M |
This file contains 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 | |
import sys | |
GUTENBERG_START = re.compile(r'\*\*\*.*START.*PROJECT GUTENBERG') | |
GUTENBERG_END = re.compile('End of.*Project Gutenberg') | |
def parse_gutenberg(fp): | |
for line in fp: | |
if GUTENBERG_START.match(line): | |
break |
This file contains 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
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
This file contains 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
#!/bin/sh | |
set -o errexit # exit on error | |
set -o nounset # treat unset variables as an error | |
argc=$# | |
weeks=0 | |
if [ $argc -ge 1 ]; then | |
if [ $1 -ge 1 ] && [ $1 -lt 100 ]; then | |
weeks=$1 |
This file contains 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
Half-assed IE6 support | |
- Follow float: (left|right) with display: inline | |
- Always specify full x,y coords for position: absolute | |
- If setting an image width, set height: 100% (or auto?) | |
- Avoid border-color: transparent |
This file contains 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
ps -p $$ | |
echo $SHELL |