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
#!/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'net/http' | |
require 'uri' | |
KEY = "webapi_hogehugapiyo" | |
HOST = "fhc" | |
PORT = 80 | |
BASE_URL = "/api/elec/action?webapi_apikey=#{KEY}" |
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 'sinatra' | |
require 'fhc4ruby' | |
ACCEPTABLE_KEY = "FHC_CALL_KEY_STRING" | |
API_KEY = "webapi_hogehoge" | |
FHC_HOST = "fhc." | |
FHC_PORT = 80 | |
get '/myfhc/:key/timer/minutes/:min' do |
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 | |
require 'date' | |
_date_from = ARGV[0] | |
_date_to = ARGV[1] | |
target_dir = ARGV[2] | |
if _date_from.nil? or _date_to.nil? | |
STDERR.puts "please specify the date_from and date_to." | |
exit 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
#!/bin/env ruby | |
lines = STDIN.readlines | |
content = "" | |
lines.each{|l| content << l.chomp << " "} | |
withdots = %w{ | |
et al | |
} | |
# パーセント |
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
Index: TwitterService.cs | |
=================================================================== | |
--- TwitterService.cs (revision 733) | |
+++ TwitterService.cs (working copy) | |
@@ -1924,8 +1924,16 @@ | |
[XmlElement("status")] | |
public Status Status; | |
[XmlElement("following")] | |
- public Boolean Following; | |
+ private String _following_str; |
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
#!/bin/env ruby | |
require 'rubygems' | |
require 'msgpack/rpc' | |
SIZE_MB = 256 | |
class MPserver | |
def ultra_heavy_value() | |
return "A" * SIZE_MB * 1024 * 1024 | |
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
#!/bin/env ruby | |
# -*- coding: utf-8 | |
def syobo_n | |
´・ω・`="論文はまだですか?" | |
return (´・ω・`) | |
end | |
puts syobo_n |
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
#!/bin/env ruby | |
require 'rubygems' | |
require 'msgpack/rpc' | |
class MyHandler | |
def add(x,y) return x+y end | |
end | |
svr = MessagePack::RPC::Server.new | |
svr.listen('0.0.0.0', 18800, MyHandler.new) |