Created
May 3, 2012 17:14
-
-
Save impronunciable/2587332 to your computer and use it in GitHub Desktop.
The way every web developer should ask for a raise
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 redis = require('redis') | |
, Tuiter = require('tuiter'); | |
var client = redis.createClient(); | |
// your twitter api credentials | |
var t = new Tuiter({ | |
"consumer_key" : "blablabla" | |
, "consumer_secret" : "blablabla" | |
, "access_token_key" : "blablabla" | |
, "access_token_secret" : "blablabla" | |
}); | |
t.sample(function(stream){ | |
stream.on('tweet', function(tweet){ | |
var encoded_tweet = JSON.stringify(tweet); | |
client.sadd('tweets', encoded_tweet); | |
}); | |
stream.on('delete', function(tweet){ | |
}); | |
stream.on('error', function(tweet){ | |
}); | |
}); |
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
1. Install nodejs: http://nodejs.org/#download | |
2. Install redis: http://redis.io/download | |
4. Create a twitter app: https://dev.twitter.com/apps/new | |
5. Install Tuiter (https://github.com/danzajdband/Tuiter) and redis NodeJS modules with npm: npm install tuiter redis | |
6. Add givememoney.js to your project (with your Twitter API Keys). | |
7. run redis: redis-server | |
8. run the script: node givememoney.js | |
9. Wait... (You can ask about 10 dolars per month every minute you are waiting for this). | |
10. Call your boss. | |
11. Save the database running "redis-cli" and when the repl prompt for your command run: save | |
12. Show the output file to your boss. | |
13. Earn more money, buy more things but remember. Money can't buy me love. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment