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 http = require('http'); | |
var path = require('path'); | |
var request = require('request'); | |
var $ = require('cheerio'); | |
var WSJ_PRIME_URL = 'http://www.bankrate.com/rates/interest-rates/wall-street-prime-rate.aspx'; | |
var app = express(); |
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 request = require('request'), | |
cheerio = require('cheerio'), | |
url= 'http://www.paginegialle.it/cinema-programmazione/Roma%20(RM)', | |
ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2'; | |
var parsePage = function(error, response, body) { | |
if (error || response.statusCode != 200) { | |
console.log(error); | |
} |
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
request = require('request') | |
cheerio = require('cheerio') | |
iconv = require('iconv-jp') | |
module.exports = (robot) -> | |
robot.hear /http(s?):\/\/(.*)/i, (msg) -> | |
url = msg.match[0] | |
unless url.match(/\.(png|jpg|jpeg|gif|txt|zip|tar\.bz|js|css)/) # filter out some common files from trying |
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 cheerio = require('cheerio') | |
var request = require('request') | |
var pictureTube = require('picture-tube') | |
var url = require('url') | |
var async = require('async') | |
var site = process.argv[2] | |
console.log('fetching', site) | |
request(site, function(e,r,b) { |
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
# Export Plugin | |
module.exports = (BasePlugin) -> | |
# Define Plugin | |
class TextPlugin extends BasePlugin | |
# Plugin name | |
name: 'text' | |
# Get the text | |
getText: (opts) -> | |
# Prepare |
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
// | |
// Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png | |
// | |
var system = require('system'); | |
var url = system.args[1]; | |
var filename = system.args[2]; | |
var page = new WebPage(); | |
page.open(url, function (status) { |
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
{ | |
"author": "Malte Legenhausen ([email protected]), John Philip Schnake ([email protected]), André König ([email protected])", | |
"name": "twitter-streamer", | |
"description": "A little app which receives tweets in realtime!", | |
"version": "0.0.1", | |
"homepage": "http://bremen.gtugs.com", | |
"repository": { | |
"url": "" | |
}, | |
"engines": { |
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 spawn = require('child_process').spawn, | |
aws2js = require('aws2js'), | |
http = require('http'), | |
urlutil = require('url') | |
mime = require('mime'), | |
Buffers = require('buffers'); | |
var settings = { | |
s3: { | |
key: 'key', |
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 Request = require("request"); | |
// USER: API 用戶名稱 | |
// PWD: API 密碼 | |
// SIGNATURE: 簽名 | |
/* METHOD: SetExpressCheckout | |
RETURNURL:當於PayPal 網站完成明細確認後,瀏覽器將帶顧客返回至此網址。 | |
CANCELURL:當顧客選擇終止付款時,瀏覽器將帶顧客返回至此網址。 |
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 fstream = require("fstream"), | |
tar = require("tar"), | |
zlib = require("zlib"); | |
fstream.Reader("src").pipe(tar.Pack()).pipe(zlib.createGzip()).pipe(fstream.Writer("output.tar.gz")); |