Last active
December 16, 2015 02:28
-
-
Save benjaminreid/5362346 to your computer and use it in GitHub Desktop.
A Git hook (commit-msg) to append a Breaking Bad quote to end of your commit messages, obviously.
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
#!/usr/bin/env ruby | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
def range_rand(min,max) | |
min + rand(max-min) | |
end | |
bads = [ | |
"Yeah, bitch! Magnets!", | |
"Just because you shot Jesse James, don’t make you Jesse James.", | |
"Sitting around, smoking marijuana, eating Cheetos and masturbating do not constitute 'plans.'", | |
"We flipped a coin, okay? You and me. You and me! Coin flip is sacred!", | |
"Oh well, heil Hitler, bitch!", | |
"A guy opens his door and gets shot, and you think that of me? No! I am the one who knocks!", | |
"I am not in danger, Skyler. I am the danger.", | |
"Let's start with some tough love. You two suck at peddling meth. Period.", | |
"You may know a lot about chemistry man but you don't know jack about slangin' dope.", | |
"Dude, you are so historically retarded!", | |
"Yeah Mr. White! Yeah science!", | |
"This kicks like a mule with its balls wrapped in duct tape!", | |
"Darth Vader had responsibilities. He was responsible for the Death Star.", | |
"You are not the guy. You’re not capable of being the guy. I had a guy, but now I don’t. You are not the guy.", | |
"We’re all on the same page. The one that says, if I can’t kill you, you’ll sure as shit wish you were dead.", | |
"I once told a woman I was Kevin Costner, and it worked because I believed it.", | |
"Better call Saul!", | |
"Chemotherapy and marijuana go together like apple pie and Chevrolet.", | |
"What's the matter, Schrader? You act like you've never seen a severed human head on a tortoise before!" | |
] | |
breaking = bads[range_rand(0,bads.length)] | |
new_message = message + " [" + breaking + "]" | |
File.open(message_file, 'w') {|f| f.write new_message } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're un-familiar with installing Git hooks, it's dead easy. Copy this file into .git/hooks and name it "commit-msg".
More info: http://git-scm.com/book/ch7-3.html#Installing-a-Hook