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
| cheerio = require('cheerio') | |
| Shred = require('shred') | |
| shred = new Shred() | |
| http = require('http') | |
| URL = require('url') | |
| server = http.createServer (request, response) -> | |
| url = URL.parse(request.url, true) | |
| urlToDiscover = url.query['url'] | |
| startDiscovery urlToDiscover, (theImageURL) -> |
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
| app.configure(function () { | |
| app.set('views', __dirname + '/views'); | |
| app.set('view engine', 'ejs'); | |
| app.use(express.bodyParser()); | |
| app.use(express.methodOverride()); | |
| app.use(express.cookieParser()); | |
| app.configure('production', function () { | |
| app.use (function (req, res, next) { | |
| var schema = (req.headers['x-forwarded-proto'] || '').toLowerCase(); | |
| if (schema === 'https') { |
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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2015 Larry Fox <http://larryfox.us> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
| express = require 'express' | |
| app = module.exports = express.createServer() | |
| # redirect to a non-www domain | |
| app.get '/*', (req, res, next) -> | |
| if req.headers.host.match(/^www\./)? | |
| res.redirect 'http://' + req.headers.host[4..] + req.url, 301 | |
| else next() |
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 express = require('express'); | |
| var sys = require('sys'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
| var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
| function consumer() { |
NewerOlder