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 | |
# -*- coding: utf-8 -*- | |
if RUBY_VERSION < "1.9" | |
$KCODE = "utf8" | |
end | |
# kc.rb : 各漢字の出現頻度を求める. | |
# 教育漢字(学習漢字,小学漢字)でない漢字を見つけることもできる. |
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 | |
# -*- coding: utf-8 -*- | |
# plus/minus/times/divide parser (w/o Taiwanese-style calculation) | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
# ruby pmtd-parser-no_tw.rb => 6÷2(1+2)=1 | |
# ruby -d pmtd-parser-no_tw.rb => ... 1 | |
# ruby -d pmtd-parser-no_tw.rb "6/2*(1+2)" => ... 9 |
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 | |
# -*- coding: utf-8 -*- | |
# plus/minus/times/divide parser | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
# ruby pmtd-parser.rb => 6÷2(1+2)=1 | |
# ruby pmtd-parser.rb -t => 6÷2(1+2)=9 | |
# ruby -d pmtd-parser.rb => ... 1 | |
# ruby -d pmtd-parser.rb -t => ... 9 |
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 | |
# -*- coding: utf-8 -*- | |
# plus/minus/times/divide parser (rational numbers ready) | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
# ruby pmtd-parser-rational.rb | |
# ruby -d pmtd-parser-rational.rb | |
# see also: http://getnews.jp/archives/114382 |
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
<ul> | |
<li><a href="javascript:(function(){var t='。',L=t.length,D='・',w=window,s=w.getSelection().toString(),d=w.open().document,m=10;for(q=m;q!=0;q--)s=D+s+D;d.writeln('<pre>');while((p=s.indexOf(t,q))!=-1){d.writeln(s.substr(p-m,L+2*m).replace(/[\u0000-\u001F|\u007F]/g,D).replace(/[\u0020-\u007E]/g,'$&_'));q=p+1;}d.writeln('</pre>');d.close();})();">「。」で検索</a></li> | |
<li><a href="javascript:(function(){var t='.',L=t.length,D='・',w=window,s=w.getSelection().toString(),d=w.open().document,m=10;for(q=m;q!=0;q--)s=D+s+D;d.writeln('<pre>');while((p=s.indexOf(t,q))!=-1){d.writeln(s.substr(p-m,L+2*m).replace(/[\u0000-\u001F|\u007F]/g,D).replace(/[\u0020-\u007E]/g,'$&_'));q=p+1;}d.writeln('</pre>');d.close();})();">「.」で検索</a></li> | |
<li><a href="javascript:(function(){var t='順',L=t.length,D='・',w=window,s=w.getSelection().toString(),d=w.open().document,m=10;for(q=m;q!=0;q--)s=D+s+D;d.writeln('<pre>');while((p=s.indexOf(t,q))!=-1){d.writeln(s.substr(p-m,L+2*m).replace(/[\u0000-\u001F|\u007F]/g,D).replace(/[\u0020-\u |
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 | |
# -*- coding: utf-8 -*- | |
class Rot90a | |
def initialize | |
@field_s = <<EOS | |
1* | |
** | |
1*1*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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
class Rot90b | |
def initialize | |
@field_s = <<EOS | |
** | |
** | |
****** | |
****** |
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 | |
# -*- coding: utf-8 -*- | |
class Rot90c | |
def initialize | |
@field_s = (<<EOS).gsub(/\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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# amazon-searcher.rb by takehikom | |
# run "gem install ruby-aaws" | |
# and prepare "~/.amazonrc" | |
require "rubygems" | |
require "amazon/aws/search" |
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 | |
# -*- coding: utf-8 -*- | |
class Rot90d | |
def initialize | |
@field_s = (<<EOS).gsub(/\n/, "") | |
** | |
** | |
****** | |
****** |
OlderNewer