Skip to content

Instantly share code, notes, and snippets.

@grauwoelfchen
Created March 3, 2011 03:11
Show Gist options
  • Save grauwoelfchen/852257 to your computer and use it in GitHub Desktop.
Save grauwoelfchen/852257 to your computer and use it in GitHub Desktop.
This is a useful command for moxssg members
#!/usr/bin/env ruby
require 'cgi'
site = CGI.escape(ARGV.first ||'')
default = 'http://www.moxssg.com/'
case site
when ''
url = default
when 'home'
url = default
when 'wiki'
url = default + 'groups/studygroup/'
when 'atnd'
url = 'http://atnd.org/users/9236'
when 'coolnotify'
url = 'http://coolnotify.com/moxssg2'
when 'twitter'
url = 'http://twitter.com/#!/moxssg'
when 'mixi'
url = 'http://mixi.jp/view_community.pl?id=3340112'
when '-h'
puts "Usage: -bash {home|wiki|atnd|coolnotify|twitter|mixi}"
exit
else
puts "omg! \"#{site}\" is unknown."
puts "see help with -h."
puts "open #{default}."
url = default
end
system "open \"#{url}\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment