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
asyncFunction: (x, y, z) ~> | |
yield | |
readFirstFile: (dir, ~, error) ~> | |
[err, files]: fs.readdir dir, ~ | |
return error(err) if err | |
[err, out]: fs.readFile files[o], ~ | |
return error(err) if err | |
yield content |
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
(function(){ | |
var asyncFunction, cacheData, map, readFirstFile; | |
asyncFunction = function asyncFunction(x, y, z, __callback) { | |
// some code, and eventually ... | |
return __callback(); | |
// initiated with an empty `yield` | |
}; | |
readFirstFile = function readFirstFile(dir, __callback, error) { | |
return fs.readdir(dir, (function(__this) { | |
var __func = function(err, files) { |
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
[err, files]: fs.readdir 'test', defer | |
files.forEach (file) -> | |
return unless file.ext is '.coffee' | |
[err, code]: fs.readFile file, defer | |
CoffeeScript.run code | |
=> | |
fs.readdir('test', (function(__this) { | |
var __func = function() { |
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
handleerr: (fn, args...) ->> | |
if ([err, out]: fn args..., defer)[0] then throw error(err) | |
else resume out | |
safe_readdir: handleerr <- {}, fs.readdir | |
safe_readfile: handleerr <- {}, fs.readFile | |
readFirstFile: (dir) ->> | |
try: | |
files: safe_readdir dir, defer |
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
handleerr: (fn, arg) ->> | |
if ([err, out]: fn arg, defer)[0] then throw error(err) | |
else resume out | |
safe_readdir: handleerr <- {}, fs.readdir | |
safe_readfile: handleerr <- {}, fs.readFile | |
readFirstFile: (dir) ->> | |
try: | |
files: safe_readdir dir, defer |
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
class UsingNode extends BaseNode | |
type: 'Using' | |
constructor: (object, methods) -> | |
@object: object | |
@methods: methods | |
compile_node: (o) -> | |
if @methods[0] == "*" | |
"for(var p in $@object) eval('var ' + p + '=' + $@object[p])" |
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
exports.Backend: class RedisBackend extends Backend | |
CONTENT: 'content' | |
DEPS: 'dependencies' | |
DATE: 'date' | |
constructor: (config) -> | |
@host: config.host || '127.0.0.1' | |
@port: config.port || 6379 | |
@db: config.db || 0 | |
@client: new redis.Client(@port, @host) |
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
cache: (file) -> | |
@test file, => | |
file.group: @name | |
@getPreparedContent file, => | |
@resolveDependencies file, => | |
@emit "resolvedDependencies", file | |
@backend.set file, (err) => | |
sys.puts "Could not cache file $file.path" if err | |
@emit "cachedFile", file |
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
echo "Installing core packages" | |
brew install gfortran | |
brew install python | |
brew install distribute | |
brew install mongodb | |
brew install hdf5 | |
brew install ghostscript | |
brew install git | |
echo "Installing custom python libraries" |
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
clickBool = false | |
contentClick = -> | |
clickBool = not a | |
@animate | |
opacity: 0.0 | |
marginTop: '-1000' | |
, 750, -> | |
element = if a then param is "virtualsystem" else "splash" | |
($ '##{element}').css |
OlderNewer