Skip to content

Instantly share code, notes, and snippets.

@badosu
Created January 5, 2012 20:34
Show Gist options
  • Save badosu/1567156 to your computer and use it in GitHub Desktop.
Save badosu/1567156 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'termios'
require 'github_api'
puts 'Github login:'
user = gets.chomp
oldt = Termios.tcgetattr($stdin)
newt = oldt.dup
newt.lflag &= ~Termios::ECHO
Termios.tcsetattr($stdin, Termios::TCSANOW, newt)
print "password:"
passwd = $stdin.gets.chomp
Termios.tcsetattr($stdin, Termios::TCSANOW, oldt)
github = Github.new do |opt|
opt.user = 'boo-box'
opt.repo = 'sledge'
opt.login = user
opt.password = passwd
end
github.repos.forks.each{|a| %x{git remote add #{a.owner.login} #{a.ssh_url}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment