Skip to content

Instantly share code, notes, and snippets.

@impronunciable
Created May 3, 2012 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save impronunciable/2587332 to your computer and use it in GitHub Desktop.
Save impronunciable/2587332 to your computer and use it in GitHub Desktop.
The way every web developer should ask for a raise
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){
});
});
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