Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Based on a true story

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star half bd79095782ee4930099175e5ce7f4c89fa3ddabcd56fffcc7c74f6f2a2d46b27 (1 ratings)
Rated 4.5 out of 5
Subscribe to updates I use hacker-scripts

Statistics on hacker-scripts

Number of watchers on Github 30953
Number of open issues 48
Average time to close an issue 19 days
Main language PHP
Average time to merge a PR about 6 hours
Open pull requests 33+
Closed pull requests 24+
Last commit about 3 years ago
Repo Created over 4 years ago
Repo Last Updated about 2 years ago
Size 84 KB
Organization / Authornarkoz
Page Updated
Do you use hacker-scripts? Leave a review!
View open issues (48)
View hacker-scripts activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating hacker-scripts for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)
What people are saying about hacker-scripts Leave a review
awesome humor

Hacker Scripts

Based on a true story:

xxx: OK, so, our build engineer has left for another company. The dude was literally living inside the terminal. You know, that type of a guy who loves Vim, creates diagrams in Dot and writes wiki-posts in Markdown... If something - anything - requires more than 90 seconds of his time, he writes a script to automate that.

xxx: So we're sitting here, looking through his, uhm, legacy

xxx: You're gonna love this

xxx: smack-my-bitch-up.sh - sends a text message late at work to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.

xxx: kumar-asshole.sh - scans the inbox for emails from Kumar (a DBA at our clients). Looks for keywords like help, trouble, sorry etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply no worries mate, be careful next time.

xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like not feeling well/gonna work from home etc. Adds a random reason from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.

xxx: (and the oscar goes to) fucking-coffee.sh - this one waits exactly 17 seconds (!), then opens a telnet session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has a TCP socket up and running) and sends something like sys brew. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.

xxx: holy sh*t I'm keeping those

Original: http://bash.im/quote/436725 (in Russian)
Pull requests with other implementations (Python, Perl, Shell, etc) are welcome.


You need these environment variables:

# used in `smack-my-bitch-up` and `hangover` scripts

# used in `kumar_asshole` script

For Ruby scripts you need to install gems: gem install dotenv twilio-ruby gmail

Cron jobs

# Runs `smack-my-bitch-up.sh` monday to friday at 9:20 pm.
20 21 * * 1-5 /path/to/scripts/smack-my-bitch-up.sh >> /path/to/smack-my-bitch-up.log 2>&1

# Runs `hangover.sh` monday to friday at 8:45 am.
45 8 * * 1-5 /path/to/scripts/hangover.sh >> /path/to/hangover.log 2>&1

# Runs `kumar-asshole.sh` every 10 minutes.
*/10 * * * * /path/to/scripts/kumar-asshole.sh

# Runs `fucking-coffee.sh` hourly from 9am to 6pm on weekdays.
0 9-18 * * 1-5 /path/to/scripts/fucking-coffee.sh

Code is released under WTFPL.

hacker-scripts open issues Ask a question     (View All Issues)
  • over 3 years I'm new to this.
  • about 4 years Well Done
  • over 4 years potential out of range error
  • over 4 years Php version
  • over 4 years IMAP error with Kumar scrpit
  • over 4 years Anywhere else to find interesting and creative automated stuff like this?
  • over 4 years Suggested inlcusion of a Gemfile for ruby scripts
  • over 4 years What if a coffee machine says that it is a teapot? HTCPCP Code 418
  • over 4 years Hipchat support
  • over 4 years Password in Source Code
  • over 4 years [Enhancement] Turing test failed on significant other for SMS responses
  • over 4 years Please provide Windows scripts
  • over 4 years Missing tests
  • over 4 years Are you the person who made these scripts or the person who translated to English? :D
  • over 4 years What type of coffee machine?
  • over 3 years Has anyone been able to recreate those ?
  • over 3 years Novice here
  • over 3 years [:|||||||||||||||||||||||||:]
hacker-scripts open pull requests (View All Pulls)
  • New and improved excuses credit http://www.careerbuilder.com/share/ab…
  • Implementation for C# - Hangover.cs and SmackMyBitch.cs implementation
  • Updated KumarAsshole.java
  • added cron for ruby and twilio instance can be a local variable
  • Changed naming conventions to be in line with java. Added dependency
  • haha, + some reason
  • Adding Perl 5 version of scripts
  • Merge pull request #1 from NARKOZ/master
  • Moved Ruby files to /ruby
  • master
  • Pizza Ordering Script
  • Cron Updates for Bash Scripts
  • add perl6 implementation
  • smack-my-bitch-up.coffee
  • Gemfile added
  • Ported smack_my_bitch_up to PHP
  • If you are locked out, then you can't work from home
  • Params check
  • Update fucking_coffee.psm1
  • Updated kumar_asshole.py to restore DB
  • go fmt on smack_my_bitch_up.go
  • Create .env.example
  • refactored to support single config file
  • Moved the ruby scripts to the damn ruby folder
  • Finish fucking-coffee.sh
  • a better translation of the quoted post from bash.im
  • Update README.md
  • Changed timestamp format
  • gf nums from env
  • Rename smack-my-bitch scripts
  • Readme file updated
  • ported fucking-coffee script to golang
  • Updated SmackMyBitch.cs to maintain the consistency of the code
hacker-scripts list of languages used
More projects by NARKOZ View all
Other projects in PHP