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
[jmoyers@Joshuas-MacBook-Air:~/Development/projects/test]:: cat package.json | |
{ | |
"author": "", | |
"name": "test", | |
"version": "0.0.0", | |
"repository": { | |
"url": "" | |
}, | |
"engines": { | |
"node": "~v0.4.9" |
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
[jmoyers@Joshuas-MacBook-Air:~/Development/projects/streams]:: npm install [email protected] | |
[email protected] ./node_modules/express | |
├── [email protected] | |
├── [email protected] | |
└── [email protected] | |
[jmoyers@Joshuas-MacBook-Air:~/Development/projects/streams]:: npm update express | |
[email protected] ./node_modules/express | |
├── [email protected] | |
├── [email protected] | |
└── [email protected] |
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
socket.on('message', function(data) { | |
var type = data.type; // more-specific-event | |
delete data.type; | |
socket.emit(type, data); | |
}); | |
socket.on('more-specific-event', function(data){ | |
// Here we can build a more specific handler and keep | |
// control logic and nested if statements related to | |
// event handling out of our application logic |
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
#!/bin/sh | |
for FILEPATH in $(svn status | grep '^C' | awk '{print $2}') | |
do | |
FILE=${FILEPATH##*/} | |
LEFT=$(find . -name ${FILE}.working*) | |
RIGHT=$(find . -name ${FILE}.merge-right*) | |
ANCESTOR=$(find . -name ${FILE}.merge-left*) | |
echo | |
echo "CONFLICT WITH: "$FILEPATH |
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
entity.id [or] user.92329D39-6F5C-4520-ABFC-AAB64544E172 |
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 EventEmitter = require('events').EventEmitter, | |
emitter = new EventEmitter(); | |
emitter.on('channel', function(event){ | |
console.log(event); | |
}); | |
emitter.emit('channel', { | |
name : 'Event', | |
description : 'An arbitrary hash of data in an object literal' |
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
while(ReadEvent(&event)){ | |
switch(event->type){ | |
case EVENT_TYPE_1: | |
/** unpack, dispatch **/ | |
break; | |
case EVENT_TYPE_2: | |
/** unpack, dispatch **/ | |
break; | |
case EVENT_TYPE_3: | |
/** some if statements, a loop, dispatch **/ |
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
$stack = function () use ($app) { | |
$args = func_get_args(); | |
return function() use ($app, $args){ | |
$req = $app['request']; | |
$res = new \Symfony\Component\HttpFoundation\Response; | |
$cb = false; | |
foreach($args as $mw){ | |
$cb = function($req, $res) use ($mw, $cb){ | |
return $cb($req, $res, function($req, $res, $cb){ | |
if( is_instance($mw, 'CallableMiddleware') ) { |
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
callPipe = [[SococoEventBus sharedInstance] addObserver: self | |
selector: @selector(onPipeVoipEvent:) | |
forType: spVOIP | |
withFilters: filters]; |
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
{ user: | |
active: true, | |
addresses: | |
[ { address1: '100 Test Street', | |
address2: 'Suite 100', | |
city: 'NewCity', | |
label: 'Home 1', | |
primary: 'true', | |
state: 'State', | |
zip: '12345' }, |