- ひがき まさる
- マッパー歴 3ヶ月
- mas_higa
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
#! /usr/bin/env ruby | |
module KOF | |
class TwoWayHash | |
def initialize(k, v) | |
@key, @val = k, v | |
@by_key = {} | |
@by_val = {} | |
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
#! /usr/bin/env ruby | |
require_relative 'venue' | |
require 'nokogiri' | |
venues = <<EOF.lines.map(&:strip) | |
サバ6製麺所 | |
OPIUM | |
EOF |
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
#! /usr/bin/env ruby | |
require 'open-uri' | |
module OSRK01 | |
def self.url venue | |
q = "%s (肥後橋|うつぼ|靭公園|靱公園)" % venue | |
"https://www.google.com/search?hl=ja&q=#{URI.encode_www_form_component q}" | |
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
#! /usr/bin/env ruby | |
require 'nokogiri' | |
html = Nokogiri::XML(open ARGV[0]) | |
def schedules(html, date, hall) | |
title = "schedule-item__title" | |
speaker = "schedule-item-speaker" | |
xpath = %|//div[@id="%s"]//tbody//td[%d]//div[@class="%s"]| |
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
#! /usr/bin/env ruby | |
require 'date' | |
module Schedule | |
def print(contents, start_time, talkers = {}) | |
end_time = start_time | |
contents.each do |talk| | |
talk.start_time = end_time | |
end_time = talk.end_time |
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
error_prompt() { | |
local e=$? | |
tput sc | |
printf "%*s" $COLUMNS $e | |
tput rc | |
return $e | |
} | |
PS1='\[$(error_prompt)\]\h$ ' |
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
「設定」-「時刻と言語」-「地域と言語」-「日付、時刻、地域の追加設定」-「言語」-「オプション」-「Microsoft IME オプション」-「詳細設定」-「全般」-「編集操作」-「キー設定」を | |
- 「Microsoft IME」 | |
+ 「IME Standard」 |
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 'minruby' | |
class Array | |
def op; self[0] end | |
def left; self[1] end | |
def right; self[2] end | |
def leaf? | |
op == "lit" | |
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
class Array | |
def name | |
self[0] | |
end | |
def left | |
self[1] | |
end | |
def right |