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 'nokogiri' | |
| require 'open-uri' | |
| require 'kconv' | |
| url = ARGV[0] ? ARGV[0].chomp : "http://blogs.yahoo.co.jp/ikedadamu/6739054.html" | |
| encode = ARGV[1] ? ARGV[1].chomp : nil | |
| page = Nokogiri::HTML(open(url),encode) | |
| puts page.to_html.toutf8 |
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 'net/http' | |
| require 'uri' | |
| def expand_url(url) | |
| uri = url.kind_of?(URI) ? url : URI.parse(url) | |
| begin | |
| Net::HTTP.start(uri.host, uri.port) do |io| | |
| r = io.head(uri.path) | |
| r['Location'] ? expand_url(r['Location']) : uri.to_s | |
| 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
| # encoding: UTF-8 | |
| require 'twitter' | |
| Twitter.configure do |config| | |
| config.consumer_key = 'consumer_key' | |
| config.consumer_secret = 'consumer_secret' | |
| config.oauth_token = 'oauth_token' | |
| config.oauth_token_secret = 'oauth_token_secret' | |
| 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
| #include <stdio.h> /* | |
| =begin | |
| */ | |
| //C言語の記述 | |
| int main(void) | |
| { | |
| printf("Hello,World!\n"); | |
| return 0; | |
| } | |
| /* |
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
| #include <stdio.h> | |
| #include <string.h> | |
| int main(void) | |
| { | |
| FILE *fpb; | |
| char str[100],filename[100]; | |
| //char str2[]=".c" | |
| char check; | |
| int length,flength,i; |
NewerOlder