Skip to content
Browse files

add haters/trolls and tweets about

  • Loading branch information...
1 parent 950a394 commit 6938de5fd9844e14110297eef9acb33037fb8d24 @atmos atmos committed Sep 11, 2011
Showing with 53 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 package.json
  3. +15 −0 src/scripts/haters.coffee
  4. +21 −0 src/scripts/trollface.coffee
  5. +14 −0 src/scripts/tweet.coffee
View
1 .gitignore
@@ -1 +1,2 @@
node_modules
+npm-debug.log
View
4 package.json
@@ -6,12 +6,12 @@
"description": "Allows you to open in to a variety of scripts",
"licenses": [{
"type": "MIT",
- "url": "http://github.com/github/github/raw/master/LICENSE"
+ "url": "http://github.com/github/hubt-scripts/raw/master/LICENSE"
}],
"repository" : {
"type" : "git",
- "url" : "http://github.com/github/hubot-scripts.git"
+ "url" : "https://github.com/github/hubot-scripts.git"
},
"dependencies": {
View
15 src/scripts/haters.coffee
@@ -0,0 +1,15 @@
+# Display a random "haters gonna hate" image
+#
+# Hubot: haters - Returns a random haters gonna hate url
+#
+#
+haters = [
+ "http://www.hatersgoingtohate.com/wp-content/uploads/2010/06/haters-gonna-hate-rubberband-ball.jpg"
+, "http://www.hatersgoingtohate.com/wp-content/uploads/2010/06/haters-gonna-hate-cat.jpg"
+, "http://jesad.com/img/life/haters-gonna-hate/haters-gonna-hate01.jpg"
+, "http://i671.photobucket.com/albums/vv78/Sinsei55/HatersGonnaHatePanda.jpg"
+, "http://24.media.tumblr.com/tumblr_lltwmdVpoL1qekprfo1_500.gif"
+]
+module.exports = (robot) ->
+ robot.respond /haters/i, (msg) ->
+ msg.send msg.random haters
View
21 src/scripts/trollface.coffee
@@ -0,0 +1,21 @@
+# Display a random "trollface" image
+#
+# Hubot: haters - Returns a trollface url
+#
+#
+trolls = [
+ "http://dl.dropbox.com/u/3561619/trollface.jpeg"
+, "http://dl.dropbox.com/u/3561619/TROLLISSA.png"
+, "http://f.cl.ly/items/1R0Y0x0m2T3U3W140N1t/Screen%20shot%202011-01-26%20at%204.19.00%20PM.png"
+, "http://dl.dropbox.com/u/3561619/gif/yourealmad.gif"
+, "http://27.media.tumblr.com/tumblr_l933pqEz4I1qajca9o1_400.jpg"
+, "http://i.imgur.com/Ir34G.jpg"
+, "http://28.media.tumblr.com/tumblr_lietg5XKKg1qz732no1_500.jpg"
+, "http://f.cl.ly/items/3I0E0z3h2V3s0D1J1F3z/troll.gif"
+, "http://27.media.tumblr.com/tumblr_lkzii5ZO3S1qz732no1_500.jpg"
+, "http://f.cl.ly/items/1B3o2K0X0K1T3V1L1E3N/youmad.gif"
+]
+
+module.exports = (robot) ->
+ robot.respond /problem\?/i, (msg) ->
+ msg.send msg.random trolls
View
14 src/scripts/tweet.coffee
@@ -0,0 +1,14 @@
+# Display a random tweet from twitter about a subject
+#
+# Hubot: github tweet - Returns a link to a tweet about github
+#
+
+module.exports = (robot) ->
+ robot.respond /(.*) tweet/i, (msg) ->
+ search = escape(msg.match[1])
+ msg.http('http://search.twitter.com/search.json')
+ .query(q: search)
+ .get() (err, res, body) ->
+ tweets = JSON.parse(body)
+ tweet = msg.random tweets.results
+ msg.send "http://twitter.com/#!/#{tweet.from_user}/status/#{tweet.id_str}"

0 comments on commit 6938de5

Please sign in to comment.
Something went wrong with that request. Please try again.