| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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
| #include <v8.h> | |
| #include <node.h> | |
| #include <stdlib.h> | |
| #include <errno.h> | |
| using namespace node; | |
| using namespace v8; | |
| struct Test_req | |
| { |
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
| <script type="text/javascript"> | |
| /* CSS to JS style detector */ | |
| document.getElementsByTagName("html")[0].className = document.getElementsByTagName("html")[0].className.replace( /(?:^|\s)no\-js(?!\S)/ , '' ) | |
| </script> |
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
| walk(process.env.HOME, function(err, results) { | |
| if (err) throw err; | |
| console.log(results); | |
| }); |
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
| var util = require("util"); | |
| var A =function() { | |
| // constructor | |
| } | |
| A.prototype.on = function() { | |
| console.log('Call A: ON'); | |
| }; |
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
| var longText = "Super Duper Long Description from the manual for the dashboard"; | |
| var shortText = "Main Screen"; | |
| var shortTxt = function(txt,max,fill) { | |
| var sTxt = txt, | |
| max = max || 12, | |
| fill = fill || '...'; | |
| if(txt.length>=max){ |
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
| function sortObject(o) { | |
| var sorted = {}, | |
| key, a = []; | |
| for (key in o) { | |
| if (o.hasOwnProperty(key)) { | |
| a.push(key); | |
| } | |
| } |
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
| /** | |
| * npm install carrier | |
| * npm install parser | |
| * tail -f /tmp/json.log | node logtest.js | |
| * | |
| * Logfile example: | |
| * {"level":"info","message":"beep boop"} | |
| * {"level":"error","message":"foo bar"} | |
| */ |
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
| var appjs = require('appjs'); | |
| // serve static files from a directory | |
| appjs.serveFilesFrom(__dirname + '/content'); | |
| // handle requests from the browser | |
| appjs.router.post('/', function(request, response, next){ | |
| response.send('Hey! How are you ' + request.post('firstname')); | |
| }) |
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
| { | |
| "name": "XXX", | |
| "version": "0.0.1", | |
| "dependencies": { | |
| "argparser": { | |
| "version": "0.2.1" | |
| }, | |
| "async": { | |
| "version": "0.1.22" | |
| }, |