This file contains 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 Transcoder = require('stream-transcoder'); | |
module['exports'] = function transcodeVideoStream (hook) { | |
var readStream = hook.open(hook.params.video); | |
hook.debug('Opening read stream to video'); | |
hook.res.writeHead(200, { | |
"Content-Type": "video/mp4" | |
}); |
This file contains 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
module['exports'] = function logParser (hook) { | |
// If the hook is not currently streaming, req has already been fully buffered | |
if (!hook.streaming) { | |
// | |
// To test a streaming Hook you can use Curl: | |
// | |
// echo "foo" | curl --header "content-type: application/octet-stream" --data-binary @- http://hook.io/Marak/transform | |
// | |
return hook.res.end('No streaming request detected. \n\nTo test streaming data to this Hook try running this Curl command: \n\n echo "foo" | curl --header "content-type: application/octet-stream" --data-binary @- http://hook.io/Marak/transform'); |
This file contains 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 events = require('events'), | |
util = require('util'); | |
var MockReadWriteStream = helpers.MockReadWriteStream = function () { | |
// | |
// No need to do anything here, it's just a mock. | |
// | |
}; | |
util.inherits(MockReadWriteStream, events.EventEmitter); |
This file contains 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
// | |
// Since the code to actually figure this out doesn't exist in node yet | |
// | |
// see: https://groups.google.com/forum/?fromgroups#!topic/nodejs-dev/QbcnxS0_yyg | |
// | |
var guessGateway = function () { | |
var network = os.networkInterfaces(), | |
guess = '10.0.0.1'; | |
Object.keys(network).forEach(function(interfaces){ |
This file contains 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
module['exports'] = function (hook) { | |
var rest = require('restler'), | |
moment = require('moment'); | |
var myGender = 'male', | |
myCountry = 'United States', | |
myDOB = '1986-05-01'; | |
var currentDate = moment(); |
This file contains 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
module['exports'] = function datastoreExample (hook) { | |
var res = hook.res, | |
req = hook.req, | |
store = hook.datastore; | |
store.set('mykey', { foo: "bar" }, function(err, result){ | |
if (err) { return res.end(err.message); } | |
store.get('mykey', function(err, result){ | |
if (err) { return res.end(err.message); } | |
res.end(JSON.stringify(result, true, 2)); | |
}); |
This file contains 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
https://frameio.geckoboard.com/dashboards/026BB9398258380D |
This file contains 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
<h1>hello world</h1> |
This file contains 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
module [ "exports"] = [ | |
'Abba', 'Achang', 'A big,' 'Adi', 'fools', 'hooligan', 'Afu', 'princes', 'donkey', 'Liza', 'Allah' 'Ali', 'Mom,' 'Oman', 'Mei', 'Niang' | |
'Lady', 'Auntie', 'flattery', 'Egypt', 'suffer side', 'one by one', 'beaten', 'wait until', 'hungry', 'one by one', 'survive', ' suffer shoulder, '' near to ',' scolded '' Punished ',' next ' | |
'Beating', 'Damn,' 'Oh,' 'cancer', 'cancer', 'cancer', 'Airan', 'Wormwood', 'Fitch', 'Ai Peng', 'moxa', ' Artemisia ',' be too embarrassed to mention ',' find it difficult to ',' in the way ',' eyesore ' | |
'Due', 'pet name', 'love', 'love', 'caress',' patriotism ',' loving ',' love ',' love ',' lovingly ',' love ',' Amy ',' loving ',' love ',' daughter ',' wife ' | |
'Love', 'love', 'love that', 'hear', 'care', 'small love', 'love', 'love and hate', 're-love', 'love child', 'Pass' 'horse', 'saddle', 'amino' 'ammonia', 'ammonia' | |
'Placement', 'Anderson', 'Andhra', 'stable', 'settled', 'placed', 'law-abiding', 'appease', 'well', 'Anhui', 'settle down', 'quiet' |
This file contains 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
sudo apt-get update | |
sudo apt-get install -y git-core build-essential libssl-dev libboost-all-dev libboost1.48-all-dev libdb5.1-dev libdb5.1++-dev libgtk2.0-dev | |
git clone https://github.com/dogecoin/dogecoin.git | |
cd dogecoin/src | |
make -f makefile.unix clean; make -f makefile.unix USE_UPNP= dogecoind |