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
(global-set-key (kbd "M-s") 'save-buffer) | |
(global-set-key (kbd "M-z") 'undo) | |
(global-set-key (kbd "<escape>") 'hippie-expand) | |
(set-face-font 'default "-apple-inconsolata-medium-r-normal--13-0-72-72-m-0-iso10646-1") | |
(add-to-list 'default-frame-alist '(width . 100)) | |
(add-to-list 'default-frame-alist '(height . 45)) | |
(setq-default tab-width 2) |
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 ruby | |
# aquamacs-editor: my $EDITOR for Aquamacs. Starts Aquamacs, waits | |
# for emacs-server to load, then runs emacsclient with the given | |
# arguments. If data is piped to stdin, it's buffered to a temporary | |
# file and passed to emacsclient instead. Waits for 'C-x #' unless | |
# invoked with -n. | |
# | |
# sstephenson 2010-09-12 | |
require "tempfile" |
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
export trim = (str) -> | |
str.match(/^\s*(.*)\s*$/)[1] | |
export {action, before} = require 'helpers' | |
export class Controller extends Base | |
constructor: (@env) -> | |
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
require.paths.unshift __dirname + '/lib' | |
task 'test', 'Run tests', -> | |
{testrunner} = require 'nodeunit' | |
process.chdir __dirname | |
testrunner.run ['test'] |
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
;; How to unfuck html-helper-mode. | |
(add-hook 'html-helper-mode-hook | |
'(lambda () | |
(auto-fill-mode nil) | |
(set (make-local-variable 'indent-line-function) | |
'sgml-indent-line) | |
(define-key html-helper-mode-map (kbd "RET") 'newline-and-indent) | |
(define-key html-helper-mode-map (kbd "TAB") 'indent-for-tab-command))) |
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
// Safari | |
var f = function() {}, ks = []; | |
f.prototype = {}; | |
for (var k in f) ks.push(k); | |
ks // => ["prototype"] |
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
window.addEventListener "DOMContentLoaded", -> | |
body = $ "body" | |
canvas = $ "#canvas" | |
chalkboard = $ "#chalkboard" | |
close = $ "#close" | |
ledge = $ "#ledge" | |
lightswitch = $ "#lightswitch" | |
output = $ "#output" | |
shade = $ "#shade" | |
share = $ "#share" |
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
require "coffee-script" | |
require "benchmark" | |
Benchmark.bmbm do |x| | |
x.report("evaluate") do | |
100.times { CoffeeScript.evaluate "a = 1" } | |
end | |
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
var dom = require("jsdom/jsdom/level2/core").dom.level2.core; | |
var browser = require("jsdom/jsdom/browser"); | |
exports.createWindow = function() { | |
var bom = browser.browserAugmentation(dom); | |
var window = browser.windowAugmentation(dom); | |
for (var key in bom) window[key] = bom[key]; | |
return window; | |
} |
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
{Script} = process.binding 'evals' | |
natives = process.binding 'natives' | |
Path = require 'path' | |
FS = require 'fs' | |
globals = { | |
Buffer, process, console, | |
setTimeout, clearTimeout, | |
setInterval, clearInterval |