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
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
have_library: checking for main() in -lc... -------------------- no | |
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -lc -lpthread -lrt -ldl -lcrypt -lm -lc" | |
cc1: error: .: 定義されたデータ型に対して値が大きすぎます | |
cc1: error: .: 定義されたデータ型に対して値が大きすぎます | |
cc1: error: conftest.c: 定義されたデータ型に対して値が大きすぎます | |
checked program was: | |
/* begin */ | |
1: /*top*/ | |
2: int main() { return 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
execve("/usr/lib/gcc/i486-linux-gnu/4.4.5/cc1", ["/usr/lib/gcc/i486-linux-gnu/4.4."..., "test.c"], [/* 28 vars */]) = 0 | |
brk(0) = 0xa75f000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb779f000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY) = 3 | |
fstat64(3, {st_mode=S_IFREG|0644, st_size=58519, ...}) = 0 | |
mmap2(NULL, 58519, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7790000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) |
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
org.torquebox.vfs (1.0.0.Beta23) lib/vfs/glob_filter.rb:10:in `initialize' | |
org.torquebox.vfs (1.0.0.Beta23) lib/vfs/ext/dir.rb:93:in `glob' | |
org.torquebox.vfs (1.0.0.Beta23) lib/vfs/ext/dir.rb:33:in `[]' | |
actionpack (3.0.3) lib/action_view/template/resolver.rb:75:in `query' | |
actionpack (3.0.3) lib/action_view/template/resolver.rb:55:in `find_templates' | |
actionpack (3.0.3) lib/action_view/template/resolver.rb:20:in `find_all' | |
actionpack (3.0.3) lib/action_view/template/resolver.rb:39:in `cached' | |
actionpack (3.0.3) lib/action_view/template/resolver.rb:19:in `find_all' | |
actionpack (3.0.3) lib/action_view/paths.rb:21:in `find_all' | |
actionpack (3.0.3) lib/action_view/paths.rb:20:in `each' |
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/zsh | |
# pdf/の下に全PDFファイルを入れてから実行する。 | |
# いつもの自炊系ツールに加えて、zipコマンドが必要。 | |
# (c)tdtds | |
mkdir pgm jpg zip | |
for pdf in pdf/*.pdf; do | |
echo $pdf | |
base=`basename $pdf _hq.pdf` | |
pdftoppm -r 300 -gray $pdf pgm/${base} | |
for pgm in pgm/${base}*.pgm; do |
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 'Win32API' | |
w32 = Win32API.new('kernel32.dll','GetModuleFileName','ppi','i') | |
buf = "\0" * 1024 | |
size = w32.call(nil, buf, 1024) | |
puts buf[0,size] |
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
@options['sp.path'] = [ | |
'/usr/local/tdiary/tdiary-core/misc/plugin', | |
'/usr/local/tdiary/tdiary-contrib/plugin', | |
] |
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/sh | |
echo "無料です" |
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
jruby --1.9 -rnkf -e 'p NKF.nkf("-s", "a").encoding' | |
#<Encoding:Windows-1251> | |
ruby1.9.1 -rnkf -e 'p NKF.nkf("-s", "a").encoding' | |
#<Encoding:Shift_JIS> | |