This file contains hidden or 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
* 受付方法 | |
+ Please print out the ticket's page and bring it to reception desk (see below how to print out). | |
+ If you cannot print out the page, please show us tickets' page using some mobile device. | |
+ After we check the printout, we will give you a name tag as an entry ticket. | |
Please don't lose a name tag. | |
* How to print out the ticket | |
+ Go to http://rubykaigi.org/my_tickets and click permalink for tickets. | |
And print out the page that 'Ticket Code' is written on. |
This file contains hidden or 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
# encoding: utf-8 | |
# Mac整備済み製品 | |
require 'nokogiri' | |
require 'open-uri' | |
BASE = 'http://store.apple.com/' | |
TOP = '/jp/browse/home/specialdeals/mac' | |
def link(product) |
This file contains hidden or 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
# twitter bots list | |
require 'nokogiri' | |
require 'open-uri' | |
BASE = 'http://usy.jp/twitter/index.php?%E4%BE%BF%E5%88%A9%E3%81%AABOT' | |
doc = Nokogiri::HTML(open(BASE)) | |
list = doc.xpath('//a[@rel="nofollow"]') | |
.map{|x| x['href']} | |
.select{|link| %r|\Ahttps?://twitter\.com/| =~ link} |
This file contains hidden or 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' | |
uri = URI.parse('http://ruby-sapporo.org') | |
uri.read.meta # => {"etag"=>"\"27711ef804dc268552cd51352c05193b\"", "x-powered-by"=>"Phusion Passenger (mod_rails/mod_rack) 2.0.3", "last-modified"=>"Mon, 06 Apr 2009 01:06:43 GMT", "connection"=>"close", "via"=>"1.0 proxy.do-johodai.ac.jp:8080 (squid/2.6.STABLE5)", "content-type"=>"text/html; charset=utf-8", "x-cache-lookup"=>"HIT from proxy.do-johodai.ac.jp:8080", "x-cache"=>"HIT from proxy.do-johodai.ac.jp", "x-runtime"=>"0.46381", "server"=>"Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g Phusion_Passenger/2.0.3", "date"=>"Mon, 06 Apr 2009 01:06:42 GMT", "content-length"=>"14493", "age"=>"129771"} |
This file contains hidden or 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 'tumblr' | |
require 'drb/drb' | |
require 'pit' | |
class TumblrServer | |
Entries = [ | |
['write', [:page, nil]], | |
['write', [:reblog, nil]] | |
] |
This file contains hidden or 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
Shoes.setup do | |
gem 'mechanize' | |
end | |
require 'mechanize' | |
Shoes.app do | |
para Gem.sources.inspect | |
end |
This file contains hidden or 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
# vim:fileencoding=utf-8 | |
# http://www.smokeymonkey.net/2009/03/lastfmrankruby.html | |
require 'rubygems' if RUBY_VERSION < '1.9' | |
require 'open-uri' | |
require 'nokogiri' | |
require 'date' | |
require 'activesupport' | |
def extract_from(url, regexp) | |
id = $1 if regexp =~ url['href'] |
This file contains hidden or 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
# vim:fileencoding=utf-8 | |
require 'rubygems' if RUBY_VERSION < '1.9' | |
require 'pit' | |
require 'nokogiri' | |
require 'mechanize' | |
require 'uri' | |
require 'activesupport' | |
Base = 'http://twitter.com/' | |
account = Pit.get('twitter.com') |
This file contains hidden or 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
# vim: fileencoding=utf-8 | |
require 'rubygems' | |
require 'net/ssh' | |
require 'net/scp' | |
require 'pit' | |
host = 'ruby-sapporo.org' | |
conf = Pit.get(host, :require => {"username" => "username", "password" => "password"}) | |
files = ['cs.rdf', 'file1', 'file2'] |
This file contains hidden or 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
def decimals(number) | |
number.to_s.split(//).size | |
end | |
def even?(number) | |
decimals(number) % 2 == 0 | |
end | |
def split(number) | |
str = number.to_s |