This file contains hidden or 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
irb(main):001:0> source = "=?ISO-2022-JP?B?GyRCIXcbKEJJVBskQj83Q2VCLkpzGyhCIC0=?= =?ISO-2022-JP?B?IDIwMTAvOS8zGyRCISEbKEI=?= =?ISO-2022-JP?B?GyRCOkdNJUBoO3Y5YCRPIUhAZEJQJW0bKEI=?= =?ISO-2022-JP?B?GyRCITwlcyVBJDUkOyRrJDMkSCEqIUkbKEI=?=" | |
=> "=?ISO-2022-JP?B?GyRCIXcbKEJJVBskQj83Q2VCLkpzGyhCIC0=?= =?ISO-2022-JP?B?IDIwMTAvOS8zGyRCISEbKEI=?= =?ISO-2022-JP?B?GyRCOkdNJUBoO3Y5YCRPIUhAZEJQJW0bKEI=?= =?ISO-2022-JP?B?GyRCITwlcyVBJDUkOyRrJDMkSCEqIUkbKEI=?=" | |
irb(main):002:0> require 'kconv' | |
=> true | |
irb(main):003:0> source.toutf8() | |
error: | |
=> "@IT新着速報 -" | |
except: |
This file contains hidden or 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
#memo: devise/lib/devise/controllers/helpers.rb | |
# The default url to be used after signing in. This is used by all Devise | |
# controllers and you can overwrite it in your ApplicationController to | |
# provide a custom hook for a custom resource. | |
# | |
# By default, it first tries to find a resource_root_path, otherwise it | |
# uses the root path. For a user scope, you can define the default url in | |
# the following way: | |
# | |
# map.user_root '/users', :controller => 'users' # creates user_root_path |
This file contains hidden or 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
scope '/account' do | |
scope :path => ':account', :constraints => {:account => /[a-zA-Z][a-zA-Z0-9]+/} do | |
resource :home, :controller => 'home' , :only => [:show] | |
end | |
end |
This file contains hidden or 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/termtter | |
<(@)//_ . . Termtter 1.8.0 | |
\\ http://termtter.org/ | |
1. Contacting to twitter... | |
/var/lib/gems/1.8/gems/oauth-0.4.0/lib/oauth/consumer.rb:215:in `token_request': 403 Forbidden (OAuth::Unauthorized) | |
from /var/lib/gems/1.8/gems/oauth-0.4.0/lib/oauth/consumer.rb:136:in `get_request_token' | |
from ./bin/../lib/termtter/api.rb:55:in `authorize_by_oauth' | |
from ./bin/../lib/termtter/api.rb:42:in `setup' |
This file contains hidden or 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
diff -r 1256a3ece94f appengine-apis/lib/appengine-apis/urlfetch.rb | |
--- a/appengine-apis/lib/appengine-apis/urlfetch.rb Tue May 04 10:42:56 2010 -0700 | |
+++ b/appengine-apis/lib/appengine-apis/urlfetch.rb Wed May 05 16:07:24 2010 +0900 | |
@@ -142,7 +142,7 @@ | |
if payload | |
if headers["Content-Length"].to_i != payload.size | |
- headers["Content-Length"] = payload.size | |
+ headers["Content-Length"] = payload.size.to_s | |
end |
This file contains hidden or 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
武田広幸様 | |
ラビックス代表取締役の藤岡と申します。 | |
この度は、弊社求人にご応募いただき、誠にありがとうございます。 | |
弊社で慎重に検討致しました結果、遺憾ながら今回は採用を見送らせていただくことになりました。 | |
誠に心苦しい限りではございますが、あしからずご了承ください。 | |
末筆ながら、今後のご活躍とご発展を心よりお祈り申し上げます。 |
This file contains hidden or 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 'java' | |
import java.io.BufferedInputStream | |
import java.io.BufferedOutputStream | |
import java.io.FileInputStream | |
import java.io.FileNotFoundException | |
import java.io.FileOutputStream | |
import java.util.zip.ZipEntry | |
import java.util.zip.ZipOutputStream |
This file contains hidden or 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 'java' | |
class RunCompare | |
import java.lang.Runnable | |
import java.util.Comparator | |
def compare(o1, o2) | |
o1 - o2 | |
end | |
def run | |
puts "running..." |
This file contains hidden or 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
#MH#######Sm(>b"#0##########8#### ########@####K5######Sm(>b"# #####(######@#####`#########`#_######@#_####### K #######_###############Х###_#H###`#####8##################h##############0######M#####++@# #_###t#M ######4p########p #_#4##############xk########_####_##############################0########## |
This file contains hidden or 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 -*- | |
config.plugins.storage.set_default(:backend, :sqlite3) | |
module Termtter::Storage | |
DATABASE_BACKEND = { | |
:sqlite3 => "sqlite3", | |
:sequel => "squerl", | |
:groonga => "groonga" | |
} |