|
Advertisement
|
Forum posts by Red Handed:Posted in Ruby Buzz Forum, Jul 11, 2006, 4:08 PM
Expiring a method. And let’s keep meta out of this. class Trial def run_me def self.run_me; raise Exception, "NO MORE." end puts "Your trial period has ended." end end t = Trial.new t.run_me #=> Your trial period has ended. t.run_me #=> (trial):3:in `run_me': NO MORE. (Exception) The run_me overwrites itself. But notice it uses def...
Posted in All Buzz Forum, Jul 9, 2006, 4:08 PM
Episode 3 of this cartoon set, which was shown at RailsConf 2006. You want to see the rest? The torrents were too up and down, so: Time.now.is_a? MagicTime The Red Scared
Posted in All Buzz Forum, Jul 9, 2006, 3:30 AM
Sensational: You just select the text you want in vim, then hit p^P and (if you’ve got xclip installed and Vim is --with-ruby) it’ll give you back the URL. Not that middle-click or ^c^v is so hard, but still a finefine use of rubyonvim. Hip hip for snip no. 606.
Posted in Ruby Buzz Forum, Jul 9, 2006, 3:30 AM
Sensational: You just select the text you want in vim, then hit p^P and (if you’ve got xclip installed and Vim is --with-ruby) it’ll give you back the URL. Not that middle-click or ^c^v is so hard, but still a finefine use of rubyonvim. Hip hip for snip no. 606.
Posted in All Buzz Forum, Jul 7, 2006, 4:07 AM
Using Mauricio’s ruby-wmii? I had a IMAP/POP3 checker in my last wmiirc and I decided to make it a plugin, to get familiar with Mauricio’s work. Put this in your ~/.wmii-3/plugins: mail-wmii-3.rb. Add a few lines to your wmiirc-config.rb also: from "mail" do use_bar_applet "imap", 440 end plugin_config["mail:imap"]["host"] =...
Posted in Ruby Buzz Forum, Jul 7, 2006, 4:07 AM
Using Mauricio’s ruby-wmii? I had a IMAP/POP3 checker in my last wmiirc and I decided to make it a plugin, to get familiar with Mauricio’s work. Put this in your ~/.wmii-3/plugins: mail-wmii-3.rb. Add a few lines to your wmiirc-config.rb also: from "mail" do use_bar_applet "imap", 440 end plugin_config["mail:imap"]["host"] =...
Posted in All Buzz Forum, Jul 5, 2006, 11:37 PM
Holy smokes: rb2js! A very clever hack ~200 lines. Outputs Ruby code as JavaScript, making up the difference with flgr’s ruby.js. Make sure you: gem install parsetree.
Posted in Ruby Buzz Forum, Jul 5, 2006, 11:37 PM
Holy smokes: rb2js! A very clever hack ~200 lines. Outputs Ruby code as JavaScript, making up the difference with flgr’s ruby.js. Make sure you: gem install parsetree.
Posted in All Buzz Forum, Jul 5, 2006, 7:38 PM
This time I’m giving a balloon out which can be used for quick testing. http://balloon.hobix.com/hpricot Or, if you want to install Hpricot 0.2: gem install hpricot --source code.whytheluckystiff.net So the Hpricot parser is basically complete. There’s still lots of fiddling ahead: it doesn’t handle Javascript whatsoever and...
Posted in Ruby Buzz Forum, Jul 5, 2006, 7:38 PM
This time I’m giving a balloon out which can be used for quick testing. http://balloon.hobix.com/hpricot Or, if you want to install Hpricot 0.2: gem install hpricot --source code.whytheluckystiff.net So the Hpricot parser is basically complete. There’s still lots of fiddling ahead: it doesn’t handle Javascript whatsoever and...
Posted in All Buzz Forum, Jul 4, 2006, 5:33 AM
gem install hpricot --source code.whytheluckystiff.net Hpricot is a nice, loose HTML parser for Ruby, written in C. I stole a bunch of code and ideas from HTree, Prototype and JQuery. The gem requires a compiler. It’s 0.1, so it’s kinda wobbly, but hey. require 'hpricot' doc = Hpricot.parse("index.html") (doc/:p/:a).each do |links|...
Posted in Ruby Buzz Forum, Jul 4, 2006, 5:33 AM
gem install hpricot --source code.whytheluckystiff.net Hpricot is a nice, loose HTML parser for Ruby, written in C. I stole a bunch of code and ideas from HTree, Prototype and JQuery. The gem requires a compiler. It’s 0.1, so it’s kinda wobbly, but hey. require 'hpricot' doc = Hpricot.parse("index.html") (doc/:p/:a).each do |links|...
Posted in All Buzz Forum, Jul 1, 2006, 4:39 PM
From defunkt: Install a script for launching balloons. Like this: inflate hot-air Which shows recent balloons from the command-line. Want to comment on balloons? Leave a wink. Or subscribe to balloon winks here.
Posted in Ruby Buzz Forum, Jul 1, 2006, 4:39 PM
From defunkt: Install a script for launching balloons. Like this: inflate hot-air Which shows recent balloons from the command-line. Want to comment on balloons? Leave a wink. Or subscribe to balloon winks here.
Posted in All Buzz Forum, Jun 30, 2006, 8:38 PM
Create new scripts from the home page. Add gems, code from Subversion, libraries from HTTP. Run other scripts (like the Tepee wiki). The important thing here is that Gems are installed into temporary directories under ~/.balloon. So you can serve the current directory or fire up a wiki with a single command.
|