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 yaml | |
### OrderedDict from <http://pypi.python.org/pypi/ordereddict/1.1> | |
# Copyright (c) 2009 Raymond Hettinger | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation files | |
# (the "Software"), to deal in the Software without restriction, |
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
node_modules | |
.#* | |
*~ |
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
<?php | |
/* | |
# X-Forwarded-Host # | |
Honor the `X-Forwarded-Host` header for the duration of a single | |
request in WordPress. | |
## Read Me First ## |
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
//// form -- form validation | |
/// | |
/// Represent the structure of a form and use it to validate form | |
/// data. Here's a Form that describes a create-account form: | |
/// | |
/// var SignupForm = form.Form('Sign Up') | |
/// .text('account', 'Account Name', form.required(/[\w-\.]+/)) | |
/// .email('email', 'Email', form.required()) | |
/// .password('password', 'Password', form.required()) | |
/// .password('confirm', 'Confirm', [form.required(), form.equal('password')]); |
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
;;; Naive Primes | |
;;; | |
;;; Produce a sequence of primes using a naive trial-division | |
;;; algorithm. This is very slow, but easy to understand at a | |
;;; glance. It's useful for unit testing. | |
;;; | |
;;; Optimizations: | |
;;; | |
;;; + Only test odd numbers for primality | |
;;; + Only do trial division up to the square root |
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
node_modules |
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 sys, socket, select, errno | |
from tornado import ioloop, iostream | |
### Main Program | |
def main(kind=None): | |
if not kind or kind not in ('Original', 'Modified'): | |
usage() |
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
//// setup.js -- add packages to require.paths | |
/// | |
/// Manage library folders and external dependency folders in your | |
/// project by including setup.js in your project. Call it from the | |
/// beginning of your project's entry-point to adjust require.paths. | |
/// | |
/// For example, if you're making an application structured like this: | |
/// | |
/// README | |
/// app.js # main program |
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
#!/usr/bin/env python | |
"""tornado-webdav.py -- run a wsgidav server through tornado | |
This script requires tornado commit id | |
1ae186a504224e9f6cf5375b56f8e26e4774e2a0. The easiest way to get this | |
patch is to clone the git repository and install using setup.py: | |
git clone git://github.com/facebook/tornado.git | |
cd tornado |
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
(defun custom-org-kill-link-as-commit-message () | |
"Capture a stored link. Add it to the kill ring in a format | |
suitable for use as a version control commit message." | |
(interactive) | |
(call-interactively 'org-store-link) | |
(let ((link (car org-stored-links))) | |
;; A link is a (list URL DESCRIPTION) | |
(kill-new (concat (cadr link) "\n" (car link) "\n")) | |
(setq org-stored-links (cdr org-stored-links)))) |
NewerOlder