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
.DS_Store | |
*.log | |
tmp/ |
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 gm = require('gm'); | |
module['exports'] = function resizeImage (hook, callback) { | |
hook.debug('Opening image stream'); | |
var readStream = hook.open(hook.params.image); | |
hook.debug('Sending image/png header'); | |
hook.res.writeHead(200, { 'Content-Type': 'image/png' }); |
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 pipeHook (hook) { | |
hook.debug('Opening echo hook with some data'); | |
var hook2 = hook.open('http://hook.io/Marak/echo?foo=bar'); | |
hook2.write('hello!'); | |
hook2.pipe(hook.res); | |
}; |
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 http = require('http'); | |
module['exports'] = function recieveHttp (hook) { | |
var hook2 = hook.open('http://hook.io/Marak/echo?foo=bar'); | |
var hook3 = hook.open('http://hook.io/Marak/echo'); | |
var hooks = 2; | |
function complete() { |
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
/** | |
* Geocoder | |
* | |
* You pass it an address and it returns a geocoded response. You will need | |
* a Geocodio API Key. | |
* | |
* @param {string} api_key Your geocodio API Key | |
* @param {string} address An address. | |
* | |
* curl--data 'api_key=XXXXX&address=123 Maple Lane, Everywhere USA' http://hook.io/desmondmorris/geocoder |
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
/** | |
* Geocoder | |
* | |
* You pass it an address and it returns a geocoded response. You will need | |
* a Geocodio API Key. | |
* | |
* @param {string} api_key Your geocodio API Key | |
* @param {string} address An address. | |
* | |
* curl--data 'api_key=XXXXX&address=123 Maple Lane, Everywhere USA' http://hook.io/desmondmorris/geocoder |
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
cat cat.jpg | curl --header "content-type: application/octet-stream" --data-binary @- http://hook.io/Marak/image/rotate > upsidedowncat.jpg |
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 simpleHook (hook) { | |
hook.res.end('Request ended'); | |
}; | |
module['exports'].theme = "http://hook.io/themes/simple/index.html"; |
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
/** | |
* Geocoder | |
* | |
* You pass it an address and it returns a geocoded response. You will need | |
* a Geocodio API Key. | |
* | |
* @param {string} api_key Your geocodio API Key | |
* @param {string} address An address. | |
* | |
* curl--data 'api_key=XXXXX&address=123 Maple Lane, Everywhere USA' http://hook.io/desmondmorris/geocoder |
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
/** | |
* Geocoder | |
* | |
* You pass it an address and it returns a geocoded response. You will need | |
* a Geocodio API Key. | |
* | |
* @param {string} api_key Your geocodio API Key | |
* @param {string} address An address. | |
* | |
* curl--data 'api_key=XXXXX&address=123 Maple Lane, Everywhere USA' http://hook.io/desmondmorris/geocoder |
OlderNewer