This file contains 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
#In Golang | |
package main | |
import ( | |
"fmt" | |
"regexp" | |
) | |
func main() { |
This file contains 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
cd /tmp | |
curl -o git-2.2.1.tar.gz "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.gz" | |
curl -o git-2.2.1.tar.sign "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.sign" | |
# if you want to verify the tar signature | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 96AFE6CB | |
gunzip git-2.2.1.tar.gz | |
gpg --verify git-2.2.1.tar.sign |
This file contains 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
#This Rake task fires every 5 minutes, checking for a particular symptom which signals a critical problem. | |
#If it finds it, it calls Patrick's cell phone. | |
#This could probably be done with PagerDuty or similar, but since I already had a Twilio account... | |
desc "Emails sysadmin if reminders are not going out" | |
task :check_for_emergency => :environment do | |
begin | |
had_emergency = Reminder.check_for_emergency! #Application code checks for a symptom of a critical problem. | |
if (had_emergency) | |
twimlet_url = "http://twimlets.com/message?Message%5B0%5D=Appointment%20reminder%20reminders%20in%20processing%20or%20scheduled.%20Appointment%20reminder%20reminders%20in%20processing%20or%20scheduled.%20Appointment%20reminder%20reminders%20in%20processing%20or%20scheduled." |
NewerOlder