Skip to content

Instantly share code, notes, and snippets.

@mururu
Created December 12, 2012 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mururu/4264466 to your computer and use it in GitHub Desktop.
Save mururu/4264466 to your computer and use it in GitHub Desktop.
Git custom command to check GitHub system status
#!/bin/sh
curl -s https://status.github.com/api/messages.json | \
ruby -rjson -rtime -e \
'JSON.parse(STDIN.gets).each{|s|c = {"good"=>"\e[32m", "minor"=>"\e[33m"}[s["status"]] || "\e[31m"; puts %{#{Time.parse(s["created_on"]).localtime}: #{c}#{s["body"].gsub("\n", " ")}\e[0m}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment