vinbarnes (owner)

Revisions

gist: 221389 Download_button fork
public
Public Clone URL: git://gist.github.com/221389.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env ruby -w
 
require 'yaml'
 
users = YAML::load(File.open(File.join(File.expand_path('~/'), '.twitrc'), 'r'))
user = users.find {|u| u[:name] == ARGV[0]}
 
if (not user.empty?)
  post = ARGV[1..-1].join(' ')
  bark = %[curl -u #{user[:name]}:'#{user[:password]}' -d status="#{post}" http://twitter.com/statuses/update.json]
  result = %x[#{bark}]
end