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": "packagename", | |
| "description": "A description of your project...even though you wont necessarily be putting it in NPM.", | |
| "version": "0.0.1", | |
| "author": "Your Name Here (http://github.com/user)", | |
| "engines": { "node": ">= 0.4.11" }, | |
| "repository": { | |
| "type": "git", | |
| "url": "http://github.com/user/project.git" | |
| }, |
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 db = require('riak-js').getClient({port: 8091}); | |
| console.log(process.argv); | |
| db.keys(process.argv[2], function(err, keys) { | |
| if (err) console.log(err); | |
| keys.forEach(function(key) { | |
| db.remove(process.argv[2], key, function(err) { | |
| if (err) console.log(err); | |
| console.log("Removed: " + 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
| /usr/local/lib/node_modules/riak-js/lib/utils.js:84 | |
| target[k] = d.value; | |
| ^ | |
| RangeError: Maximum call stack size exceeded |
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
| /* | |
| * Goto -> http://duiker101.tk/hackertyper/ | |
| * Open a console | |
| * Copy and paste the following | |
| * Fullscreen your window | |
| * ? | |
| * Profit | |
| */ | |
| var eventEl = document.getElementById('console'); |
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
| node | |
| > module | |
| { id: 'repl', | |
| exports: | |
| { writer: [Function], | |
| REPLServer: [Function: REPLServer], | |
| start: [Function], | |
| repl: { context: [Object], bufferedCommand: 'module\n', outputStream: [Object], inputStream: [Object], prompt: '> ', rli: [Object], commands: [Object] } }, | |
| parent: undefined, | |
| filename: <current path>, |
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 serve_cgi(filename, res, get, post, method, vhost, port, pinfo, get, sname, uri, droot) { | |
| var env = { | |
| CONTENT_LENGTH: post.length, | |
| CONTENT_TYPE: 'application/x-www-form-urlencoded', | |
| DOCUMENT_ROOT: droot, | |
| GATEWAY_INTERFACE: 'CGI/1.1', | |
| HTTP_HOST: vhost, | |
| QUERY_STRING: get, | |
| REDIRECT_STATUS: '200', | |
| REQUEST_METHOD: method, |
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 http = require('http'), | |
| util = require('util'); | |
| var options = { | |
| host: 'api.twitter.com', | |
| port: 80, | |
| path: '/1/statuses/public_timeline.json' | |
| }; | |
| var chunks = [], | |
| total = 0; |
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 spawn = require('child_process').exec, | |
| exports = module.exports; | |
| exports.getTables = function(cb) { | |
| var lines = [], | |
| get = spawn('echo "list" | ./hbase shell', | |
| function (err, stdout, stderr) { | |
| if (err) { | |
| console.log(err); | |
| } |
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 OTest() { | |
| console.log('test'); | |
| } | |
| module.exports = OTest; |
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 http = require('http'); | |
| var options = { | |
| host: 'www.google.com', | |
| port: 80, | |
| path: '/index.html' | |
| }; | |
| http.get(options, function(res) { | |
| console.log("Got response: " + res.statusCode); |