Skip to content

Instantly share code, notes, and snippets.

mumriks

Block or report user

Report or block mumriks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5e4b890950bfb1ca71264385bd0871b2
Ruby-2.3.1+tDiary-3.2.1
---------
500 Internal Server Error
~/public_html/diary/tdiary/tdiary_style.rb:25: regexp encoding option 'e' differs from source encoding 'UTF-8'
~/public_html/diary/tdiary/tdiary_style.rb:193: regexp encoding option 'e' differs from source encoding 'UTF-8'
~/public_html/diary/tdiary/tdiary_style.rb:196: regexp encoding option 'e' differs from source encoding 'UTF-8'
~/public_html/diary/tdiary/tdiary_style.rb:214: regexp encoding option 'e' differs from source encoding 'UTF-8'
~/public_html/diary/tdiary/tdiary_style.rb:217: regexp encoding option 'e' differs from source encoding 'UTF-8' (SyntaxError)
@mumriks
mumriks / 23fig.rb
Created Feb 3, 2016
平方数を除く 2,3,5,6,7,8,10... という数列で、指定番目の数を返す関数
View 23fig.rb
def fig2(num)
count = 0
i = 2
until count == num
count += 1 if Math.sqrt(i) != Math.sqrt(i).to_i
i += 1
end
return i - 1
end
@mumriks
mumriks / xlsxgrep.rb
Last active Aug 29, 2015
エクセルグレップ(2007 以降用) 要:RubyZip
View xlsxgrep.rb
# encoding: utf-8
#
# エクセル2007 以降のファイル内を検索する
# 2014/07/28, 2014/07/30
require 'rexml/document'
require 'rubygems'
require 'zip/filesystem'
class Sheet
@mumriks
mumriks / odsgrep.rb
Last active Aug 29, 2015
Libre Office の集計表ファイル(.ods)を行単位で検索。(家計簿ファイルを想定)要:RubyZip
View odsgrep.rb
# encoding: utf-8
#
require 'rexml/document'
require 'rubygems'
require 'zip/filesystem'
def usage
print "usage: ruby odsgrep.rb <検索文字列> files...\n"
exit(1)
You can’t perform that action at this time.