Skip to content

Instantly share code, notes, and snippets.

View mgreensmith's full-sized avatar

Matt Greensmith mgreensmith

View GitHub Profile
@mgreensmith
mgreensmith / github-show-remote-head-timestamp
Created October 30, 2013 21:04
Shows the timestamp of the HEAD commit of a remote branch in GitHub, without having to fetch it locally. Uses the octokit API client.
#!/usr/bin/env ruby
require 'rubygems'
require 'octokit'
REPO = 'analog-analytics/merchant-portal'
BRANCH = 'master'
# get a token with:
# curl -u '<username>' -d '{"scopes":["repo"],"note":"for CLI use"}' https://api.github.com/authorizations