Skip to content

Instantly share code, notes, and snippets.

View kuryaki's full-sized avatar
🏠
Working from home

David Roncancio kuryaki

🏠
Working from home
View GitHub Profile
@kuryaki
kuryaki / gist:6875876
Last active December 24, 2015 22:49
HTTP streams with node
//SERVER
var http = require('http');
http.createServer(function (req, res) {
req.on('data', function(chunk) {
console.log('server received: ' + chunk);
res.write(chunk);
});
@kuryaki
kuryaki / gist:5817093
Created June 19, 2013 19:12
Stanza Error
<message from="+573105805315@test.twnel.net" to="+573014311354@test.twnel.net/16319533291371668128292844" type="error" messageType="plain" fromName="bbva" serviceType="opcallcenter" date="Wed, 19 Jun 2013 18:56:46 GMT" xmlns:stream="http://etherx.jabber.org/streams"><body>test</body><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>
@kuryaki
kuryaki / comparepubatom
Created November 27, 2012 03:18
Compare data received from pubsub and atom suscription
pubsubhub information:
{
"after": "0943e7a820de29f6a223a5b23c0dc8531a3e280a",
"before": "7db933f0405d0d94a267a7021856c8ec032229f0",
"commits": [
{
"added": [
"config.js"
],
@kuryaki
kuryaki / gist:4149443
Created November 26, 2012 17:14
javascript to run bash
Node File
---------------
#!/usr/bin/node
var spawn = require('child_process').spawn,
ls = spawn('./testBash');
ls.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});