Skip to content

Instantly share code, notes, and snippets.

View masuidrive's full-sized avatar

Yuichiro MASUI masuidrive

View GitHub Profile
require 'kconv'
require 'iconv'
require 'nkf'
require 'test/unit'
class GuessEncoding < Test::Unit::TestCase
def setup
@euc = "うまく表示してね!".kconv(Kconv::EUC, Kconv::SJIS)
end
require 'kconv'
require 'iconv'
require 'nkf'
require 'test/unit'
class GuessEncoding < Test::Unit::TestCase
def setup
# EUC-JP encoded うまく表示してね!
@euc = "¥345¥341¥254¥345¥242¥300¥345¥341¥276¥352¥241¥243¥245¥243¥356¥246¥245¥263¥345¥341¥316¥345¥242¥250¥345¥341¥245¥345¥376¥276"
end
@masuidrive
masuidrive / tif2016.rb
Last active July 21, 2016 06:44 — forked from cheebow/tif2016.rb
TIF2016出演アイドル別に出演時間を表示する
require 'open-uri'
require 'json'
response = open('http://www.idolfes.com/2016/json/timetable/time.json')
data = JSON.parse(response.read)
artists = {}
data.each do |day, stages|
stages.each do |stage, items|
items.each do |item|