Skip to content

Instantly share code, notes, and snippets.

View hsbt's full-sized avatar
🏠
Working from home

Hiroshi SHIBATA hsbt

🏠
Working from home
View GitHub Profile
#!/usr/bin/ruby
C = nil
o = ""
o.instance_eval("def m; C; end")
o.m
puts 1
o.clone.m
puts 2
gsed -i "1s/.*/# -\*- coding: utf-8; -\*-\n&/" **/*.rb
Array.forEach( $$(".foo")[0].getElementsByTagName("input"), function(e){ if(e.type=="checkbox") e.checked=true; } );
require 'rubygems'
require 'ruby-prof'
RubyProf.start
result = RubyProf.stop
printer = RubyProf::FlatPrinter.new(result)
open('rubyprof.txt', 'w+') do |f|
printer.print(f, 0)
end
# -*- coding: utf-8 -*-
$:.unshift(File.expand_path("../", File.dirname(__FILE__)))
require 'webrick'
require 'webrick/httpservlet/cgihandler'
require 'webrick/httputils'
require 'webrick/accesslog'
require 'tempfile'
require 'fileutils'
require 'tdiary'
500 Internal Server Error
incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)
(tdiary/lang/ja.rb):66:in `scan'
(tdiary/lang/ja.rb):66:in `shorten'
(plugin/makerss.rb):315:in `makerss_desc_shorten'
(plugin/makerss.rb):387:in `makerss_body'
(plugin/makerss.rb):238:in `block (3 levels) in makerss_update'
(plugin/makerss.rb):237:in `each'
500 Internal Server Error
incompatible character encodings: UTF-8 and ASCII-8BIT
(Encoding::CompatibilityError)
(plugin/makerss.rb):384:in `makerss_body'
(plugin/makerss.rb):238:in `block (3 levels) in makerss_update'
(plugin/makerss.rb):237:in `each'
(plugin/makerss.rb):237:in `block (2 levels) in makerss_update'
(plugin/makerss.rb):235:in `each'
;; Menloを使う
(create-fontset-from-ascii-font "Menlo-14:weight=normal:slant=normal" nil "menlokakugo")
(set-fontset-font "fontset-menlokakugo"
'unicode
(font-spec :family "Hiragino Kaku Gothic ProN" :size 16)
nil
'append)
(add-to-list 'default-frame-alist '(font . "fontset-menlokakugo"))
/usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': .) %
when not(target[0] == ?#)
^
from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from atig.rb:41