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
Derek-Williss-MacBook-Pro:zappa-test derek$ zappa cuppa.coffee | |
Error: ENOENT, No such file or directory 'node' | |
at Object.openSync (fs:153:18) | |
at Object.readFileSync (fs:94:15) | |
at Zappa.read (/usr/local/lib/node/.npm/zappa/0.1.3/package/lib/zappa.js:67:17) | |
at Zappa.run_file (/usr/local/lib/node/.npm/zappa/0.1.3/package/lib/zappa.js:71:75) | |
at Object.run_file (/usr/local/lib/node/.npm/zappa/0.1.3/package/lib/zappa.js:650:23) | |
at Object.<anonymous> (/usr/local/lib/node/.npm/zappa/0.1.3/package/bin/zappa.coffee:96:15) | |
at Object.<anonymous> (/usr/local/lib/node/.npm/zappa/0.1.3/package/bin/zappa.coffee:100:4) | |
at Module._compile (node.js:462:23) |
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
foo = -> | |
dog = "a dog" | |
transmorg = -> | |
`var dog = "a cat"` | |
console.log "in transmorg: dog == #{dog}" | |
transmorg() | |
console.log "outside, dog == #{dog}" | |
foo() |
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
# Add custom shader | |
# http://www.html5rocks.com/en/tutorials/webgl/shaders/ | |
vertexShader = """ | |
// create a shared variable for the | |
// VS and FS containing the normal | |
varying vec3 vNormal; | |
void main() { | |
// set the vNormal value with |
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
1374266202 INFO cjdroute2.c:454 Forking angel to background. | |
1374266202 DEBUG AdminClient.c:263 Connecting to [127.0.0.1:11234] | |
1374266202 DEBUG UDPAddrInterface.c:151 Bound to address [0.0.0.0] | |
1374266202 INFO Configurator.c:90 Checking authorized password 0. | |
1374266202 INFO Configurator.c:102 Flushing existing authorized passwords | |
1374266202 INFO Configurator.c:108 Adding authorized password #[0]. | |
1374266202 INFO RandomSeed.c:57 Attempting to seed random number generator | |
1374266202 INFO RandomSeed.c:72 Trying random seed [RtlGenRandom() (Windows)] Failed | |
1374266202 INFO RandomSeed.c:72 Trying random seed [sysctl(KERN_ARND) (BSD)] Failed | |
1374266202 INFO RandomSeed.c:68 Trying random seed [/dev/urandom] Success |
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
// main.go | |
package main | |
func main() { | |
Foo() | |
} | |
// json.go | |
package main | |
func Foo() { | |
} |
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 random | |
def isPrime(n): | |
#print 'is ',n,' prime?' | |
# make sure n is a positive integer | |
n = abs(int(n)) | |
# 0 and 1 are not primes | |
if n < 2: | |
#print 'no' | |
return False |
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
// Get http://acme.com/software/bigint/ | |
// Then change Makefile to point CC to emcc. | |
// make | |
// Emscripten compile with the following line: | |
// emcc bigint.a -O2 -o bigint.html -s EXPORTED_FUNCTIONS="['_str_to_bi_base', '_bi_mod_power', '_bi_int_mod', '_bi_copy', '_bi_initialize', '_bi_int_divide', '_bi_compare', '_int_to_bi', '_digit_to_char']" | |
// Now go to bigint.html & run the following code: | |
var bi_initialize = Module.cwrap('bi_initialize', null, []) | |
var str_to_bi_base = Module.cwrap('str_to_bi_base', 'number', ['string', 'number']) | |
var bi_int_mod = Module.cwrap('bi_int_mod', 'number', ['number', 'number']) |
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
//////////// ROUTER | |
//////////// ROUTER | |
$(function() { | |
window.onhashchange = function() { | |
if (location.hash) { | |
gotoRoute((location.path||'')+location.hash, false); | |
} else { | |
gotoRoute(location.path||'', false); | |
} |
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
type RowScanner interface { | |
Scan(dest ...interface{}) error | |
} | |
type ModelInfo struct { | |
Type reflect.Type | |
TableName string | |
Fields []*reflect.StructField | |
FieldsSimple string | |
FieldsPrefixed string |
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
// How to use https://github.com/jaekwon/mysql/ | |
conn, _ := sql.Open("mysql", dbHost) | |
// You can't set the level here, the tx connection returned by Begin() isn't guaranteed to | |
// be in the same session | |
// conn.Exec("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE") | |
tx, _ := conn.Begin() | |
// Before would have err'd, can't set after Begin()! |
OlderNewer