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
# A python script which anonymizes email addresses in all files in current directory and sub-directories. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
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
# A python script which anonymizes email addresses in all files in current directory and sub-directories. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
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
# A python script which anonymizes email addresses in all files in current directory and sub-directories. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
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
# A python script which anonymizes email addresses in all files in current directory and sub-directories. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
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
# A python script which anonymizes email addresses in all files in current directory and sub-directories. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
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 fraktur = require('fraktur'); | |
// assumes text has been posted as form data or is part of query string | |
// you could just as easily parse hook.req for incoming data instead | |
hook.res.end(fraktur(hook.params.text)); | |
}; | |
module['exports'].schema = { | |
"text": { | |
"type": "string", |
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 faker (hook) { | |
var faker = require('faker'); | |
var params = hook.params; | |
var parts = params.property.split('.'); | |
faker.locale = hook.params.locale; | |
var result = faker[parts[0]][parts[1]](); | |
hook.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
module['exports'] = function staticHook (hook) { | |
hook.debug("Debug messages are sent to the debug console"); | |
hook.debug(hook.params); | |
hook.debug(hook.req.path); | |
hook.debug(hook.req.method); | |
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 view (hook) { | |
var view = require('view'); | |
var marak = 'https://raw.githubusercontent.com/Marak/marak.com/master/view'; | |
var url = hook.req.headers['x-forwarded-url']; | |
view.create( { remote: marak } , function (err, v) { | |
if (err) { | |
return hook.res.end(err.message); | |
} | |
v.remote(url, function (err, result) { | |
if (err) { |
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 _colors = ["random", "red", "green", "blue", "yellow", "cyan", "rainbow", "zalgo"]; | |
module['exports'] = function colorsHook (hook) { | |
var colors = require('colors'), | |
color = hook.params.color; | |
var text = hook.params.text || ""; | |
// if random color is selected, return a random color |