Skip to content

Instantly share code, notes, and snippets.

@alkema
Created July 13, 2010 16:10
Show Gist options
  • Save alkema/474108 to your computer and use it in GitHub Desktop.
Save alkema/474108 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# github + launchy = gaunchy
# open your current repo (+ path) in your browser
# $ gaunchy.rb app/models
require 'rubygems'
require 'git'
require 'launchy'
g = Git.open('.')
path = g.remote('origin').url.split(':').last.gsub('.git', '')
url = "https://github.com/#{path}"
url += "/tree/master/#{ARGV.first}" if ARGV.first
Launchy.open(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment