This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| var pcap = require('pcap'), // npm install pcap | |
| tcp_tracker = new pcap.TCP_tracker(), | |
| pcap_session = pcap.createSession('en1'); // Change to your interface | |
| pcap_session.on('packet', function (raw_packet) { | |
| var packet = pcap.decode.packet(raw_packet); | |
| tcp_tracker.track_packet(packet); | |
| }); | |
| tcp_tracker.on('http response body', function(session, http, data) { |
| JSCLASS_PATH = 'build/min'; | |
| require('./' + JSCLASS_PATH + '/loader'); | |
| JS.require('JS.Deferrable'); | |
| Promise = new JS.Class({ | |
| include: JS.Deferrable, | |
| initialize: function(value) { | |
| if (value !== undefined) this.succeed(value); |
| /* | |
| File: KeychainItemWrapper.h | |
| Abstract: | |
| Objective-C wrapper for accessing a single keychain item. | |
| Version: 1.2 - ARCified | |
| Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
| Inc. ("Apple") in consideration of your agreement to the following | |
| terms, and your use, installation, modification or redistribution of |
| # ## Backbone model caching | |
| # This is a simple solution to the problem "how do I make less requests to | |
| # my server?". | |
| # | |
| # Whenever you need a model instance, this will check first if the same thing | |
| # has been fetched before, and gives you the same instance instead of fetching | |
| # the same data from the server again. | |
| # | |
| # Reusing the same instance also has the great side-effect of making your | |
| # model changeable from one part of your code, with your changes being available |
| //app.js Socket IO Test | |
| var app = require('express').createServer(), | |
| redis = require('socket.io/node_modules/redis'), | |
| io = require('socket.io').listen(app); | |
| var pub = redis.createClient(port, "url"); | |
| var sub = redis.createClient(port, "url"); | |
| var store = redis.createClient(port, "url"); | |
| pub.auth('pass', function(){console.log("adentro! pub")}); | |
| sub.auth('pass', function(){console.log("adentro! sub")}); |
Since this is on Hacker News and reddit...
_t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".char *s.type * name, however, is entirely intentional.| var serialport = require('node-serialport') | |
| var sp = new serialport.SerialPort("/dev/ttyO3", { | |
| parser: serialport.parsers.raw, | |
| baud: 9600 | |
| }) | |
| sp.on('data', function(chunk) { | |
| console.log(chunk.toString('hex'), chunk.toString(), chunk) | |
| }) |
| M[16],X=16,W,k;main(){T(system("stty cbreak") | |
| );puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i | |
| ,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M | |
| [w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< | |
| (l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) | |
| ]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d | |
| -1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] | |
| *i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4; | |
| )s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4|| | |
| puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2 |
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |