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
;;; 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 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
node_modules | |
.#* | |
*~ |
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
(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)))) |
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
<?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 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
node_modules |
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
// In Express 1.0.8, the `res.app` and `req.app` properties aren't restored when | |
// outerNext() is called by nested server middleware. | |
// | |
// Run this script, then try to visit something handled by the `notFound()` middleware | |
// (e.g. `http://localhost:3000/mumble`. An assertion error is raised because `res.app` | |
// is equal to the `middleware()` instead of `app`. | |
var Assert = require('assert'), | |
Express = require('express'), | |
app = Express.createServer(); |
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 json | |
from datetime import datetime | |
class Foo(object): | |
def __init__(self, when): | |
self.when = when | |
def __json__(self): | |
return self.__dict__ |
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
.packages | |
*.pyc |
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
// An example of how to use stack introspection to determine the | |
// filename of a calling script. | |
// | |
// node stack1.js | |
// | |
function blah() { | |
require('./stack2'); | |
} |
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
gambit-server/web-server | |
snap-hello-server/bin | |
snap-hello-server/dist/ |
NewerOlder