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
# http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
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
defaults: &defaults | |
adapter: postgresql | |
encoding: utf8 | |
username: username | |
password: password | |
host: localhost | |
pool: 10 | |
development: | |
database: application_name_development |
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
Norman Schur's 1000 Most Important Words | |
This is Norman Schur's list of the 1,000 "most important" words. There are actually 1,019 here because of those that are similarly spelled, opposites of one another, etc. I've gone through and marked with asterisks the ones (*) that I'm somewhat uncomfortable with (177 of these), as in I'd be slightly apprehensive if you challenged me to pinpoint their meaning, and the ones (**) that I'm basically clueless about (26 of these). I feel roughly fluent with the rest. | |
abashed | |
*abate | |
abdicate | |
aberrant | |
abominate | |
abrasive | |
abrogate |
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 | |
# Name generating code | |
# Copyright (c) 2010 Ninite.com | |
# | |
# Released into the public domain - enjoy! | |
# | |
# Story at http://blog.ninite.com/post/620277259/how-ninite-was-named-by-a-computer-program | |
from datetime import datetime, date |
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
require 'open3' | |
class RbST | |
@@executable_path = File.expand_path(File.join(File.dirname(__FILE__), "rst2parts")) | |
@@executables = { | |
:html => File.join(@@executable_path, "rst2html.py"), | |
:latex => File.join(@@executable_path, "rst2latex.py") | |
} | |
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
require 'rubygems' | |
require 'nokogiri' | |
include Nokogiri | |
class PostCallbacks < XML::SAX::Document | |
def start_element(element, attributes) | |
puts "start element: #{element}" | |
puts "attributes: #{attributes.inspect}" | |
end |
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
# Library of Congress Main Classes and Subclasses | |
{ | |
"A" => { | |
:name => "General Works", | |
:subclasses => { | |
"AC" => "Collections; Series; Collected works", | |
"AE" => "Encyclopedias", | |
"AG" => "Dictionaries and other general reference works", | |
"AI" => "Indexes", | |
"AM" => "Museums. Collectors and collecting", |
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
# http://www.loc.gov/standards/iso639-2/ascii_8bits.html | |
ISO_639_2 = [ | |
["aar", "", "aa", "Afar", "afar"], | |
["abk", "", "ab", "Abkhazian", "abkhaze"], | |
["ace", "", "", "Achinese", "aceh"], | |
["ach", "", "", "Acoli", "acoli"], | |
["ada", "", "", "Adangme", "adangme"], | |
["ady", "", "", "Adyghe; Adygei", "adyghé"], | |
["afa", "", "", "Afro-Asiatic languages", "afro-asiatiques, langues"], |
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 ruby | |
# -*- ruby -*- | |
require 'rubygems' | |
require 'daemon-spawn' | |
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
class DelayedJobWorker < DaemonSpawn::Base | |
def start(args) | |
ENV['RAILS_ENV'] ||= args.first || 'development' |
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
# smoother space switching animations for snow leopard | |
$ sudo defaults write /Library/Preferences/com.apple.windowserver Compositor -dict deferredUpdates 0 |