Skip to content

Instantly share code, notes, and snippets.

@2009
2009 / delayed_job@.service
Last active December 24, 2022 04:43
delayed_job systemd service
[Unit]
Description=Start delayed_job instance %i
After=mysql.service
[Service]
Type=forking
User=pier
WorkingDirectory=/home/pier/sites/admin
ExecStart=/home/pier/scripts/rvm_wrap_command.sh -e production -c "/home/pier/sites/admin/bin/delayed_job -i %i start" -w /home/pier/.rvm/environments/ruby-2.4.0@admin
ExecStop=/home/pier/scripts/rvm_wrap_command.sh -e production -c "/home/pier/sites/admin/bin/delayed_job -i %i stop" -w /home/pier/.rvm/environments/ruby-2.4.0@admin
@chuckwagoncomputing
chuckwagoncomputing / excuses.sh
Created November 28, 2015 01:14
BOFH excuses
#!/usr/bin/env bash
EXCUSES="/path/to/excuses.txt"
awk 'NR=='$((1 + $RANDOM % `nl $EXCUSES | tail -n 1 | awk '{print $1}' `))'{print;exit}' $EXCUSES
2/20/12,Presidents Day (Washingtons Birthday)
4/6/12,Good Friday
5/28/12,Memorial Day
7/4/12,Independence Day
9/3/12,Labor Day
11/22/12,Thanksgiving Day
12/25/12,Christmas Day
1/1/13,New Year Day
1/21/13,Martin Luther King Jr. Day
2/18/13,Presidents Day (Washingtons Birthday)