Skip to content

Commit 9b6ec36

Browse files
committed
Merge branch 'master' into help-update
2 parents c7a4185 + a87798a commit 9b6ec36

File tree

6 files changed

+170
-30
lines changed

6 files changed

+170
-30
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
npm-debug.log
3-
.DS_Store*
3+
.DS_Store*
4+
.idea
5+

src/scripts/beerme.coffee

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Beer Me
2+
#
3+
# beer me - Grab me a beer
4+
#
5+
6+
beers = [
7+
"http://organicxbenefits.com/wp-content/uploads/2011/11/organic-beer-health-benefits.jpg",
8+
"http://www.beer100.com/images/beermug.jpg",
9+
"http://www.joyandfood.com/wp-content/uploads/2012/05/Beer-beer.jpg",
10+
"http://www.bristolvantage.com/wp-content/uploads/2012/02/beer-calories1.jpg",
11+
"http://cdn.biruwananbai.com/wp-content/uploads/2012/04/more_beer-01.jpg",
12+
"http://blog.collegebars.net/uploads/10-beers-you-must-drink-this-summer/10-beers-you-must-drink-this-summer-sam-adams-summer-ale.jpg"
13+
"http://media.treehugger.com/assets/images/2011/10/save-the-beers.jpg",
14+
"http://poemsforkush.files.wordpress.com/2012/04/beer.jpg",
15+
"http://www.wirtzbeveragegroup.com/wirtzbeveragenevada/wp-content/uploads/2010/06/Beer.jpg",
16+
"http://www.walyou.com/blog/wp-content/uploads/2010/06/giant-beer-glass-fathers-day-beer-gadgets-2010.jpg",
17+
"http://images.free-extras.com/pics/f/free_beer-911.jpg",
18+
"http://images.seroundtable.com/android-beer-dispenser-1335181876.jpg",
19+
"http://www.mediabistro.com/fishbowlDC/files/original/beer-will-change-the-world.jpg",
20+
"http://dribbble.s3.amazonaws.com/users/79978/screenshots/594281/attachments/47191/more.png",
21+
"http://www.gqindia.com/sites/default/files/imagecache/article-inner-image-341-354/article/slideshow/1289/beer.JPG",
22+
"http://www.gqindia.com/sites/default/files/imagecache/article-inner-image-341-354/article/slideshow/1289/beer2.jpg",
23+
"http://www.gqindia.com/sites/default/files/imagecache/article-inner-image-341-354/article/slideshow/1289/Beer3.jpg"
24+
]
25+
26+
module.exports = (robot) ->
27+
robot.hear /.*(beer me).*/i, (msg) ->
28+
msg.send msg.random beers

src/scripts/janky.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ module.exports = (robot) ->
7777
app = msg.match[1]
7878
branch = msg.match[3] || "master"
7979
room_id = msg.message.user.room
80+
user = msg.message.user.name
8081

81-
post "#{app}/#{branch}?room_id=#{room_id}", {}, (err, statusCode, body) ->
82+
post "#{app}/#{branch}?room_id=#{room_id}&user=#{user}", {}, (err, statusCode, body) ->
8283
if statusCode == 201 or statusCode == 404
8384
response = body
8485
else

src/scripts/meme_captain.coffee

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Get a meme from http://memecaptain.com/
2+
#
3+
# hubot Y U NO <text> - Generates the Y U NO GUY with the bottom caption of <text>
4+
#
5+
# hubot I don't always <something> but when i do <text> - Generates The Most Interesting man in the World
6+
#
7+
# hubot <text> (SUCCESS|NAILED IT) - Generates success kid with the top caption of <text>
8+
#
9+
# hubot <text> ALL the <things> - Generates ALL THE THINGS
10+
#
11+
# hubot <text> TOO DAMN <high> - Generates THE RENT IS TOO DAMN HIGH guy
12+
#
13+
# hubot Not sure if <text> or <text> - Generates Futurama Fry
14+
#
15+
# hubot Yo dawg <text> so <text> - Generates Yo Dawg
16+
#
17+
# hubot ALL YOUR <text> ARE BELONG TO US - Generates Zero Wing with the caption of <text>
18+
#
19+
# hubot If <text>, <word that can start a question> <text>? - Generates Philosoraptor
20+
#
21+
# hubot <text>, BITCH PLEASE <text> - Generates Yao Ming
22+
#
23+
# hubot <text>, COURAGE <text> - Generates Courage Wolf
24+
#
25+
# hubot ONE DOES NOT SIMPLY <text> - Generates Boromir
26+
#
27+
# hubot IF YOU <text> GONNA HAVE A BAD TIME - Ski Instructor
28+
#
29+
# hubot IF YOU <text> TROLLFACE <text> - Troll Face
30+
31+
32+
module.exports = (robot) ->
33+
robot.respond /Y U NO (.+)/i, (msg) ->
34+
memeGenerator msg, 'y_u_no.jpg', 'Y U NO', msg.match[1], (url) ->
35+
msg.send url
36+
37+
robot.respond /(.*) (ALL the .*)/i, (msg) ->
38+
memeGenerator msg, 'all_the_things.jpg', msg.match[1], msg.match[2], (url) ->
39+
msg.send url
40+
41+
robot.respond /(I DON'?T ALWAYS .*) (BUT WHEN I DO,? .*)/i, (msg) ->
42+
memeGenerator msg, 'most_interesting.jpg', msg.match[1], msg.match[2], (url) ->
43+
msg.send url
44+
45+
robot.respond /(.*)(SUCCESS|NAILED IT.*)/i, (msg) ->
46+
memeGenerator msg, 'success_kid.jpg', msg.match[1], msg.match[2], (url) ->
47+
msg.send url
48+
49+
robot.respond /(.*) (\w+\sTOO DAMN .*)/i, (msg) ->
50+
memeGenerator msg, 'too_damn_high.jpg', msg.match[1], msg.match[2], (url) ->
51+
msg.send url
52+
53+
robot.respond /(NOT SURE IF .*) (OR .*)/i, (msg) ->
54+
memeGenerator msg, 'fry.png', msg.match[1], msg.match[2], (url) ->
55+
msg.send url
56+
57+
robot.respond /(YO DAWG .*) (SO .*)/i, (msg) ->
58+
memeGenerator msg, 'xzibit.jpg', msg.match[1], msg.match[2], (url) ->
59+
msg.send url
60+
61+
robot.respond /(.*)\s*BITCH PLEASE\s*(.*)/i, (msg) ->
62+
memeGenerator msg, 'yao_ming.jpg', msg.match[1], msg.match[2], (url) ->
63+
msg.send url
64+
65+
robot.respond /(.*)\s*COURAGE\s*(.*)/i, (msg) ->
66+
memeGenerator msg, 'courage_wolf.jpg', msg.match[1], msg.match[2], (url) ->
67+
msg.send url
68+
69+
robot.respond /ONE DOES NOT SIMPLY (.*)/i, (msg) ->
70+
memeGenerator msg, 'boromir.jpg', 'ONE DOES NOT SIMPLY', msg.match[1], (url) ->
71+
msg.send url
72+
73+
robot.respond /(IF YOU .*\s)(.* GONNA HAVE A BAD TIME)/i, (msg) ->
74+
memeGenerator msg, 'bad_time.jpg', msg.match[1], msg.match[2], (url) ->
75+
msg.send url
76+
77+
robot.respond /(.*)TROLLFACE(.*)/i, (msg) ->
78+
memeGenerator msg, 'troll_face.jpg', msg.match[1], msg.match[2], (url) ->
79+
msg.send url
80+
81+
robot.respond /(IF .*), ((ARE|CAN|DO|DOES|HOW|IS|MAY|MIGHT|SHOULD|THEN|WHAT|WHEN|WHERE|WHICH|WHO|WHY|WILL|WON\'T|WOULD)[ \'N].*)/i, (msg) ->
82+
memeGenerator msg, 'philosoraptor.jpg', msg.match[1], msg.match[2] + (if msg.match[2].search(/\?$/)==(-1) then '?' else ''), (url) ->
83+
msg.send url
84+
85+
86+
memeGenerator = (msg, imageName, text1, text2, callback) ->
87+
imageUrl = "http://memecaptain.com/" + imageName
88+
msg.http("http://memecaptain.com/g")
89+
.query(
90+
u: imageUrl,
91+
t1: text1,
92+
t2: text2
93+
).get() (err, res, body) ->
94+
return msg.send err if err
95+
result = JSON.parse(body)
96+
if result? and result['imageUrl']?
97+
callback result['imageUrl']
98+
else
99+
msg.reply "Sorry, I couldn't generate that meme."
100+
101+
102+

src/scripts/meme_generator.coffee

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# hubot Yo dawg <text> so <text> - Generates Yo Dawg
2323
# hubot ALL YOUR <text> ARE BELONG TO US - Generates Zero Wing with the caption of <text>
2424
# hubot if <text>, <word that can start a question> <text>? - Generates Philosoraptor
25+
# hubot <text> FUCK YOU - Angry Linus
2526
#
2627
# Author:
2728
# skalnik
@@ -54,7 +55,7 @@ module.exports = (robot) ->
5455
msg.send url
5556

5657
robot.respond /(GOOD NEWS EVERYONE[,.!]?) (.*)/i, (msg) ->
57-
memeGenerator msg, 79, 108785, msg.match[1], msg.match[2], (url) ->
58+
memeGenerator msg, 1591, 112464, msg.match[1], msg.match[2], (url) ->
5859
msg.send url
5960

6061
robot.respond /khanify (.*)/i, (msg) ->
@@ -77,6 +78,10 @@ module.exports = (robot) ->
7778
memeGenerator msg, 17, 984, msg.match[1], msg.match[2] + (if msg.match[2].search(/\?$/)==(-1) then '?' else ''), (url) ->
7879
msg.send url
7980

81+
robot.respond /(.*) FUCK YOU/i, (msg) ->
82+
memeGenerator msg, 1189472, 5044147, msg.match[1], 'FUCK YOU', (url) ->
83+
msg.send url
84+
8085
memeGenerator = (msg, generatorID, imageID, text0, text1, callback) ->
8186
username = process.env.HUBOT_MEMEGEN_USERNAME
8287
password = process.env.HUBOT_MEMEGEN_PASSWORD

src/scripts/yoda-quotes.coffee

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,33 @@
1313
# Author:
1414
# vquaiato
1515

16+
quotes = [
17+
"Agree with you, the council does. Your apprentice, Skywalker will be.",
18+
"Always two there are, no more, no less: a master and an apprentice.",
19+
"Fear is the path to the Dark Side. Fear leads to anger, anger leads to hate; hate leads to suffering. I sense much fear in you.",
20+
"Qui-Gon's defiance I sense in you.",
21+
"Truly wonderful the mind of a child is.",
22+
"Around the survivors a perimeter create.",
23+
"Lost a planet Master Obi-Wan has. How embarrassing. how embarrassing.",
24+
"Victory, you say? Master Obi-Wan, not victory. The shroud of the Dark Side has fallen. Begun the Clone War has.",
25+
"Much to learn you still have...my old padawan... This is just the beginning!",
26+
"Twisted by the Dark Side young Skywalker has become.",
27+
"The boy you trained, gone he is, consumed by Darth Vader.",
28+
"The fear of loss is a path to the Dark Side.",
29+
"If into the security recordings you go, only pain will you find.",
30+
"Not if anything to say about it I have.",
31+
"Great warrior, hmm? Wars not make one great.",
32+
"Do or do not; there is no try.",
33+
"Size matters not. Look at me. Judge me by my size, do you?",
34+
"That is why you fail.",
35+
"No! No different. Only different in your mind. You must unlearn what you have learned.",
36+
"Always in motion the future is.",
37+
"Reckless he is. Matters are worse.",
38+
"When nine hundred years old you reach, look as good, you will not.",
39+
"No. There is... another... Sky... walker..."
40+
]
41+
1642
module.exports = (robot) ->
17-
robot.hear /^yoda quote$/i, (msg) ->
18-
quotes = ["Agree with you, the council does. Your apprentice, Skywalker will be.",
19-
"Always two there are, no more, no less: a master and an apprentice.",
20-
"Fear is the path to the Dark Side. Fear leads to anger, anger leads to hate; hate leads to suffering. I sense much fear in you.",
21-
"Qui-Gon's defiance I sense in you.",
22-
"Truly wonderful the mind of a child is.",
23-
"Around the survivors a perimeter create.",
24-
"Lost a planet Master Obi-Wan has. How embarrassing … how embarrassing.",
25-
"Victory, you say? Master Obi-Wan, not victory. The shroud of the Dark Side has fallen. Begun the Clone War has.",
26-
"Much to learn you still have...my old padawan... This is just the beginning!",
27-
"Twisted by the Dark Side young Skywalker has become.",
28-
"The boy you trained, gone he is, consumed by Darth Vader.",
29-
"Death is a natural part of life. Rejoice for those around you who transform into the Force. Mourn them do not. Miss them do not. Attachment leads to jealousy. The shadow of greed that is. Train yourself to let go of everything you fear to lose.",
30-
"The fear of loss is a path to the Dark Side.",
31-
"If into the security recordings you go, only pain will you find.",
32-
"Not if anything to say about it I have.",
33-
"Great warrior, hmm? Wars not make one great.",
34-
"Do or do not; there is no try.",
35-
"Size matters not. Look at me. Judge me by my size, do you?",
36-
"That is why you fail.",
37-
"No! No different. Only different in your mind. You must unlearn what you have learned.",
38-
"Always in motion the future is.",
39-
"Reckless he is. Matters are worse.",
40-
"When nine hundred years old you reach, look as good, you will not.",
41-
"No. There is... another... Sky... walker..."]
42-
msg.send msg.random quotes
43-
43+
robot.hear /.*(yoda quote).*/i, (msg) ->
44+
msg.send msg.random quotes
45+

0 commit comments

Comments
 (0)