I hereby claim:
- I am hide24 on github.
- I am hidetoshi (https://keybase.io/hidetoshi) on keybase.
- I have a public key ASBGr4PjwU7QL0yEbyJYSkNwPCWf_h6oMGYsuY8caIQY7Ao
To claim this, I am signing this object:
#! /bin/bash | |
WAYF_URL="https://ds.gakunin.nii.ac.jp/WAYF/embedded-wayf.js" | |
LOCAL_FILENAME_BASE="embedded-wayf_js" | |
SUGGEST_URL="https://ds.gakunin.nii.ac.jp/GakuNinDS/incsearch/suggest.js" | |
SUGGEST_LOCAL_PATH="/ember_osf_web/suggest_js" | |
LOCALES=( ja en ) | |
for locale in "${LOCALES[@]}" | |
do |
I hereby claim:
To claim this, I am signing this object:
class Hash | |
def rdiff(other) | |
new_hash = {} | |
self.each do |key, value| | |
if other.key?(key) | |
if value.kind_of?(Hash) | |
if other[key].kind_of?(Hash) | |
diff = value.rdiff(other[key]) | |
unless diff.empty? | |
new_hash[key] = diff |
class Hash | |
def rdelete(other) | |
new_hash = {} | |
self.each do |key, value| | |
if other.key?(key) | |
if value.kind_of?(Hash) | |
if other[key].kind_of?(Hash) | |
new_hash[key] = value.rdelete(other[key]) | |
if new_hash[key].empty? | |
new_hash.delete(key) |
class Player | |
def play_turn(warrior) | |
spaces = warrior.look | |
space = spaces.first | |
backwards = warrior.look(:backward) | |
health = warrior.health | |
if space.enemy? | |
warrior.attack! | |
elsif space.captive? | |
warrior.rescue! |
class String | |
def decode_sharacter_refernce | |
self.gsub(/&#(?:(\d*?)|(?:x([0-9a-f]{4})));/i){[($1)? $1.to_i: $2.to_i(16)].pack('U')} | |
end | |
end | |
'♪'.decode_sharacter_refernce | |
#=> "\342\231\252" | |
puts '♪'.decode_sharacter_refernce | |
#♪ |
class Hash | |
def rmerge(other) | |
new_hash = {} | |
keys = (self.keys + other.keys).uniq | |
keys.each do |k| | |
if other.key?(k) | |
if self.key?(k) && self[k].kind_of?(Hash) | |
new_hash[k] = self[k].rmerge(other[k]) | |
else |