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
for JS in $(find . -name "*.js") | |
do | |
echo Processing $JS | |
echo "alert(\"Starting $JS\");" > $JS.new | |
cat $JS >> $JS.new | |
mv $JS.new $JS | |
done |
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.onerror = function(e, u, l) { | |
alert("Error: " + e); | |
return true; | |
}; |
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
#!/bin/sh | |
F=myFont.ttf | |
DATAURI=$(uuencode -m $F processed | grep -v begin-base64 | grep -v "====" | tr -d "\n") | |
echo ' | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> |
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
logData 0 | |
// bring up the login screen | |
navigate http://wal.sh/form/login.html | |
logData 1 | |
// log in | |
setValue name=registrationIdId someuser@aol.com | |
setValue name=password somepassword |
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
#!/bin/sh | |
# POC of a CLI sprite generator | |
# This should mirror the behavior (i.e., default generation) of online scripts | |
# http://spritegen.website-performance.org/ | |
# Usage: Run from the directory of images that should be sprited | |
# TODO: Just use files on the command line | |
# TODO: Convert to Python | |
# Setup: Populate ~/.spritesrc to change any of default values noted below |
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
#!/bin/sh | |
#sudo gem install compass | |
# This will generate the following error: | |
# ERROR: While executing gem ... (Gem::RemoteSourceException) | |
# HTTP Response 302 fetching http://gems.rubyforge.org/yaml | |
sudo gem install rubygems-update --source http://production.s3.rubygems.org/ | |
sudo gem update --system --source http://production.s3.rubygems.org/ |
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
#!/bin/sh | |
# Review: Style, nomenclature, structure, and performance | |
for G in http://github.com/janl/mustache.js.git http://github.com/jquery/jquery-tmpl.git http://github.com/documentcloud/underscore.git http://github.com/donnerjack13589/nTPL.git http://github.com/SamuraiJack/Shotenjin-Joosed.git http://github.com/fitzgen/tempest.git http://github.com/atduskgreg/srender.git http://github.com/trix/nano.git | |
do | |
git clone $G | |
done | |
# http://dojotoolkit.org/reference-guide/dojo/replace.html - Not the core framework |
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
(setq load-path (cons (expand-file-name "~/lisp") load-path)) | |
(autoload 'js2-mode "js2" nil t) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(setq load-path (cons (expand-file-name "~/sandbox/nodelint.js/examples/emacs") load-path)) | |
(require 'flymake-nodelint) | |
(add-hook 'javascript-mode-hook | |
(lambda () (flymake-mode t))) |
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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
OlderNewer