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
'use strict'; | |
/*eslint-env node */ | |
var fs = require('fs'), | |
esprima = require('esprima'); | |
var input = process.argv[2], | |
output = input, | |
offset = 0, | |
content = fs.readFileSync(input, 'utf-8'), |
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
var GLOBAL_Env = []; | |
for (var x in window) { | |
if (window.hasOwnProperty(x)) { | |
GLOBAL_Env.push(x); | |
} | |
} | |
function GLOBAL_FindAdded() { | |
var newVars = []; |
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.emacswiki.org/emacs/BrowseAproposURL | |
(require 'browse-url) | |
(setq apropos-url-alist | |
'( | |
("^g:? +\\(.*\\)" . ;; Google Web | |
"http://www.google.com/search?q=\\1") | |
("^g?w:? +\\(.*\\)" . ;; Google Wikipedia |
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
def escape_as_javascript_string_literal(text): | |
""" | |
Escape the required characters and surround with double quotes to produce a | |
valid ECMAScript string literal from any normal string. | |
---- | |
ECMA-262 -> 7.8.4 String Literals | |
A string literal is zero or more characters enclosed in single or |
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/local/bin/python | |
# simple perlin noise | |
#------------------------------------------------------------------------------ | |
# Copyright (C) 2009 James Brooks (kerspoon) | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; version 2 dated June, 1991. | |
# |
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/local/bin/python | |
# template for python programs | |
#------------------------------------------------------------------------------ | |
# Copyright (C) 2009 James Brooks (kerspoon) | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; version 2 dated June, 1991. | |
# |
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 | |
# Python Utilities - replaced by `defaultdict` and `join` | |
import csv | |
import sys | |
from itertools import islice | |
# ---------------------------------------------------------------------------- # | |
# countedadd :: {set(T)=int}, set(T) -> {set(T)=int} | |
def countedadd(database,sample): |
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/local/bin/python | |
from pyparsing import * | |
import StringIO | |
from decimal import Decimal | |
import string | |
import logging | |
logger = logging.getLogger(__name__) |