This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'rubygems' | |
require 'hpricot' | |
require 'rss/maker' | |
content = RSS::Maker.make("2.0") do |feed| | |
feed.channel.title = "gamearena forums - enemy territory" | |
feed.channel.link = "http://www.gamearena.com.au" | |
feed.channel.description = "GA ET forums" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
url = open("http://steamcommunity.com/id/syd/friends") | |
doc = Nokogiri::HTML(url) | |
doc.xpath('//a[@class="linkFriend_online"]').each {|x| puts x.text} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* dm_basics.sp | |
* Base CS:S DM admin/control functions. | |
* This file is part of CS:S DM, Copyright (C) 2005-2007 AlliedModders LLC | |
* by David "BAILOPAN" Anderson, http://www.bailopan.net/cssdm/ | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 | |
* of the License, or (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adopt a section! | |
The Sinatra Book (http://github.com/cschneid/sinatra-book/tree/master) needs a little love. | |
I'm proposing a few of us adopt a small section of the book each to continue to contribute and maintain, particularly for the inevitable 1.0 release. | |
So, how do you help? | |
Contribute what you can to a section as well as check spelling, grammar, relevance, and correctness (do the given code and config examples still apply to the current release?). Build it, can it be formatted better? (lets not forget the PDF!). | |
Also remember to check the markdown is sane. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✈ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
haml :index | |
end | |
post '/' do | |
params[:upload][:tempfile].read | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'eventmachine' | |
module SimpleResponse | |
def receive_data data | |
if data =~ /^GET/ | |
then | |
send_data "HTTP/1.1 200\nContent-type: text/plain\n\nHello World!" | |
close_connection_after_writing | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syd@teh: sudo gem update --backtrace | |
Updating installed gems | |
ERROR: While executing gem ... (ArgumentError) | |
marshal data too short | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:209:in `load' | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:209:in `load_specs' | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:173:in `list' | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:165:in `each' | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:165:in `list' | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:116:in `find_matching' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2009 Unbit S.a.s. <[email protected]> | |
# see the COPYRIGHT file | |
$stdout.sync = true | |
options = {} | |
if Process.uid == 0 | |
puts "Never run uRack as root !!!" | |
exit | |
end |
OlderNewer