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
// my.req defined | |
// my.since_id defined | |
// my.user_agent defined | |
var refresh = function() { | |
var path = '/search.json?' + my.req; | |
var options = { host: 'search.twitter.com', | |
port: 80, | |
method: 'GET', | |
path: path, |
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
my.consumer_key = ''; | |
my.consumer_secret = ''; | |
my.access_token = ''; | |
my.access_secret = ''; | |
my.oa = new oauth.OAuth("https://api.twitter.com/oauth/request_token", | |
"https://api.twitter.com/oauth/access_token", | |
my.consumer_key, | |
my.consumer_secret, |
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 util = require('util'); | |
var events = require('events'); | |
/** | |
* A Lock | |
* | |
* @extends events.EventEmitter | |
* | |
* @param spec {} | |
*/ |
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 OAuth= require('oauth').OAuth; | |
var oa = new OAuth("https://api.twitter.com/oauth/request_token", | |
"https://api.twitter.com/oauth/access_token", | |
"gQMpiVjZFMqQnJcdRhetw", | |
"VklJTgBbL9upi3jNWJmaN1Yh6qXCrK96787Ef4gUg", | |
"1.0", | |
"http://usecrowd.com/oauth", | |
"HMAC-SHA1"); | |
oa.getOAuthRequestToken(function(err, oauth_token, oauth_token_secret, results) { |
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
/** Used for functional inheritance */ | |
Object.prototype.method = function(name, method, _super) { | |
var that = this; | |
if(_super) { | |
var m = that[name]; | |
_super[name] = function() { | |
return m.apply(that, arguments); | |
}; | |
} | |
this[name] = method; |
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 TwitterNode = require('twitter-node').TwitterNode; | |
var twit = new TwitterNode({ user: /*TWITTER-USER*/, | |
password: /*TWITTER-PASSWORD*/, | |
track: ['code', 'coding'], | |
headers: { "User-Agent": 'my user agent' } | |
}); | |
twit.on('error', function(error) { | |
console.log(error.message); | |
}); |
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
<div class="pac-container" style="position: absolute; z-index: 1000; left: 472px; top: 76px; width: 398px; "> | |
<div class="pac-item pac-selected"> | |
<b>New</b> | |
York, NY | |
</div> | |
<div class="pac-item"> | |
<b>New</b> | |
Jersey | |
</div> | |
<div class="pac-item"> |
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
sudo apt-get install nginx | |
sudo apt-get install spawn-fcgi | |
apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl |
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
#!/bin/bash | |
## ABSOLUTE path to the PHP binary | |
PHPFCGI="/usr/bin/php5-cgi" | |
## tcp-port to bind on | |
FCGIPORT="9000" | |
## IP to bind on | |
FCGIADDR="127.0.0.1" |
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
server { | |
listen 80; | |
[...] | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} |
OlderNewer