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 'thread' | |
class MisoQueueQueue | |
def initialize misoque | |
@misoque = misoque | |
end | |
def push obj | |
@misoque.push self,obj |
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
# coding: utf-8 | |
require 'mechanize' | |
id = '' | |
pass = '' | |
url_login = 'http://p.eagate.573.jp/gate/p/login.html' | |
url_player = 'http://p.eagate.573.jp/game/jubeat/copious/p/playdata/index.html' | |
url_music1 = 'http://p.eagate.573.jp/game/jubeat/copious/p/playdata/music.html?page=1' |
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 'socket' | |
require 'digest/sha2' | |
Te = %w[rock scissors paper] | |
Te_cmd = %w[r s p] | |
if ARGV.length != 2 || !ARGV[1].to_i || ARGV[1].to_i <= 0 | |
puts File.basename(__FILE__) + " <server_host> <port>" | |
exit |
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
# coding: utf-8 | |
class EventHandler | |
def initialize | |
@methods = [] | |
end | |
def add(method) | |
if [email protected]?(method) |
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/ruby | |
BaseDir = File::expand_path(File::dirname(__FILE__)) | |
Dir.chdir(BaseDir) | |
Files = Dir::glob("**/*.plot") | |
Files.each do |fpplot| | |
puts fpplot | |
target_dir = File::dirname(fpplot) | |
fnplot = File::basename(fpplot) |
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
" http://vimwiki.net/?OptionList | |
"---------------- | |
" ui, color | |
"---------------- | |
syntax on | |
set background=dark | |
"colorscheme desert | |
"colorscheme molokai | |
"colorscheme jellybeans |
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
# original Ruby Twitter Gem : example/helper/config_store.rb | |
# modified at 2009/08/13 | |
require 'yaml' | |
class ConfigStore | |
attr_reader :file | |
def initialize(file) | |
@file = file |
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 DSLObject < BasicObject | |
include ::Kernel | |
end | |
class DSLContext | |
attr_reader :params | |
def initialize &block |
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
# coding: utf-8 | |
require_relative 'string_xor' | |
"hoge".xor("fuga") #=> "\x0E\x1A\x00\x04" | |
# 非破壊的です |
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
# coding: utf-8 | |
require 'uri' | |
require 'open-uri' | |
require 'rexml/document' | |
require 'json' | |
require_relative 'romkan' | |
# http://0xcc.net/ruby-romkan/ | |
YAHOO_APP_ID = 'YOUR YAHOO APPLICATION ID' |
OlderNewer