GitCasts — Screencasts about using Git
Stumbled over the site GitCasts which publishes regular screencasts about using Git. Should be worth a look for anyone who which to learn more about Git.
Stumbled over the site GitCasts which publishes regular screencasts about using Git. Should be worth a look for anyone who which to learn more about Git.
Was playing around a bit with the Twitter4R library the other day and realized that in order to make it to work on Mac OS X (Leopard) you need to also require ‘time’. Or you will get an error similar to lib/twitter/model.rb:268:in `init’: undefined method `parse’ for Time:Class (NoMethodError).
A small snippet to display my public tweets:
require 'rubygems'
gem('twitter4r', '0.3.0')
require 'twitter'
# Required on Mac OS X Leopard
require 'time'
twitter = Twitter::Client.new
hallski_timeline = twitter.timeline_for(:user, :id => 'hallski')
hallski_timeline.each do |status|
puts status.text
end
Last week I sat down and wrote bindings for Loudmouth. This means that anyone who want to write an XMPP enabled application with GTK+/Ruby now have an asynchronous library that integrates perfectly with the GLib mainloop.
It also gives me access to testing and writing small scripts using Loudmouth with the beauty of Ruby.
Here is a small example showing the bindings in the current state:
require 'loudmouth'
conn = LM::Connection.new
conn.jid = 'myjid@mydomain.com'
conn.open do |open_result|
if open_result
conn.authenticate('username', 'password', 'resource') do |auth_result|
if result
puts "Authenticated, do your stuff"
end
end
end
end
GLib::MainLoop.new.run
So far I have only bound the asynchronous calls and I am not sure whether I will bind synchronous ones in the future.
If you want to try them out or even better, help out by improving them or write example code. Create an account at Github and watch/clone the repository. It’s named loudmouth-ruby.