Startup a service that depends on amino
./bin/myservice --conf=/path/to/my/conf
Startup a service using the default conf path
./bin/myservice
| $ node app.js | |
| My specific title | |
| green | |
| undefined |
| {exec, spawn} = require 'child_process' | |
| task 'test', 'Run Mocha tests', -> | |
| proc = spawn 'mocha', ['-R', 'spec', '--colors'] | |
| proc.stdout.on 'data', (buffer) -> console.log buffer.toString() | |
| proc.stderr.on 'data', (buffer) -> console.error buffer.toString() | |
| proc.on 'exit', (status) -> | |
| process.exit(1) if status != 0 |
| <a href="javascript: void(0);" onmouseover="(function(elem) { someLibraryFunction(elem); })(this);">Fancy Text</a> |
| <?php | |
| /** | |
| * Save a remote image. Returns a file object. | |
| */ | |
| function download_image($url) { | |
| // Check if the file extension is valid. | |
| $extensions = 'jpg jpeg png gif'; | |
| $parsed = parse_url($url); | |
| $regex = '/\.(' . @ereg_replace(' +', '|', preg_quote($extensions)) . ')$/i'; | |
| if (!preg_match($regex, $parsed['path'], $matches)) { |
| cpsubrian@blink ~/projects/node/gac (master) | |
| $ cake repl | |
| -------------------------- | |
| ____ _ ____ | |
| / ___| / \ / ___| | |
| | | _ / _ \| | | |
| | |_| |/ ___ \ |___ | |
| \____/_/ \_\____| | |
| GAC REPL - try 'help' |
| numRead = 0 | |
| numImported = 0 | |
| doneReading = false | |
| csv = require('csv')() | |
| csv.fromPath result.filepath, {columns: true} | |
| finish = () -> | |
| process.stdout.write '\n' | |
| log "" | |
| log "Imported #{numImported} users".green |
Startup a service that depends on amino
./bin/myservice --conf=/path/to/my/conf
Startup a service using the default conf path
./bin/myservice
| var path = /^\/socket\.io.+/; | |
| app.router.get(path, handler); | |
| console.log(app.router.routes); | |
| /* CONSOLE OUTPUT | |
| { '^': { 'socket\\.io.+': { get: [Function: handler] } } } | |
| */ |
| $ node http.js | |
| events.js:48 | |
| throw arguments[1]; // Unhandled 'error' event | |
| ^ | |
| Error: connect EADDRNOTAVAIL | |
| at errnoException (net.js:670:11) | |
| at connect (net.js:548:19) | |
| at Socket.connect (net.js:613:5) | |
| at Object.<anonymous> (net.js:77:12) |
| // relations api | |
| // users | |
| var carlos = 'carlos8f' | |
| , brian = 'cpsubrian' | |
| , sagar = 'astrosag_ngc4414' | |
| // repos | |
| var buffet = 'carlos8f/node-buffet' | |
| , views = 'cpsubrian/node-views' |