Skip to content

Instantly share code, notes, and snippets.

bitlist = [1, 0, 1, 0, 0, 1, 1, 1, 0];
kids = {
brother: {
name: "Max",
age: 11
},
song = ["do", "re", "mi", "fa", "so"]
singers = {Jagger: "Rock", Elvis: "Roll"}
bitlist = [
1, 0, 1
0, 0, 1
1, 1, 0
]
bitlist = [
1, 0, 1
0, 0, 1
1, 1, 0
]
bitlist = [
1, 0, 1
0, 0, 1
1, 1, 0
]
twit.addListener('tweet', function(tweet) {
//sys.puts("@" + tweet.user.screen_name + ": " + tweet.text);
//console.log(tweet)
db.save(tweet);
socket.broadcast(tweet);
console.log(twit.trackKeywords);
}).stream();
twit.addListener('tweet', (tweet) ->
# sys.puts "@#{tweet.user.screen_name}: #{tweet.text}"
# console.log tweet
db.save tweet
socket.broadcast tweet
console.log twit.trackKeywords
).stream()
Error: addListener only takes instances of Function
at Server.<anonymous> (events.js:94:11)
at new Server (http.js:947:10)
at Object.createServer (http.js:964:10)
at Object.<anonymous> (/home/sid137/dev/obistro/streamer.coffee:22:17)
at Object.<anonymous> (/home/sid137/dev/obistro/streamer.coffee:49:4)
at Module._compile (module.js:404:26)
at Object.run (/home/sid137/local/node/lib/node/.npm/coffee-script/1.0.1/package/lib/coffee-script.js:55:19)
at /home/sid137/local/node/lib/node/.npm/coffee-script/1.0.1/package/lib/command.js:115:29
at /home/sid137/local/node/lib/node/.npm/coffee-script/1.0.1/package/lib/command.js:85:26
socket = io.listen(server);
socket.on('connection', function(client) {
return client.send('Welcome to the Tweet Monitor!!!\n\n\n\n');
});
twit.addListener('tweet', function(tweet) {
db.save(tweet);
socket.broadcast(tweet);
return console.log(twit.trackKeywords);
}).stream();
}).call(this);
@sid137
sid137 / Gemfile.lock
Created July 2, 2011 22:16
Gemfile.lock
GIT
remote: git://github.com/bmabey/database_cleaner.git
revision: 8bcee52a94360f3c8ff727def4de2e64dd2e2841
specs:
database_cleaner (0.6.7)
GIT
remote: git://github.com/jnicklas/carrierwave.git
revision: 3850f67ce1b7d25db595c3e2ec28b81ac172467c
specs:
# Edit this Gemfile to bundle your application's dependencies.
source 'http://rubygems.org'
gem 'rails', '3.0.9' #, :git => 'git://github.com/rails/rails.git'
gem 'rake', '0.8.7'
gem "haml-rails"
gem "jquery-rails"
# Gem to abstract away the dplication common in standard restful controllers
gem 'inherited_resources'