Skip to content

Instantly share code, notes, and snippets.

@atuyosi
atuyosi / unicorn-fastladder.service
Created June 16, 2015 07:43
unit file for unicorn(falstladder)
View unicorn-fastladder.service
[Unit]
Description=Fastladder Unicorn Server
After=mysqld.service
[Service]
Type=forking
User=rails
WorkingDirectory=/var/lib/rails/fastladder
Environment=RAILS_ENV=production
SyslogIdentifier=fastladder-unicorn
@atuyosi
atuyosi / fastladder-crawler.service
Created June 16, 2015 07:46
unit file for fastladder-crawler
View fastladder-crawler.service
[Unit]
Description=Fastladder crawler
After=mysqld.service
[Service]
Type=simple
User=rails
WorkingDirectory=/var/lib/rails/fastladder
Environment=RAILS_ENV=production
SyslogIdentifier=fastladder-crawler
View fastladder-unicorn
!/sbin/runscript
set_unicornvars() {
UNICORN_PID="/var/lib/fastladder/tmp/pids/unicorn.pid"
UNICORN_CONF="/var/lib/fastladder/config/unicorn.rb"
FAST_HOME="/var/lib/fastladder"
}
extra_commands="depend"
extra_started_commands="reload"
View full-trace-ruby-tesseract-ocr-0.18
irb(main):001:0> require 'tesseract-ocr'
CompilationError: compile error: see logs at /tmp/.ffi-inline-1000/00ac1de4050b632b230475bd71c0dc3a7de45a89.log
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/compilers/gcc.rb:35:in `compile'
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders/c.rb:114:in `shared_object
'
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:90:in `block in build'
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:87:in `instance_eval'
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:87:in `build'
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/inline.rb:54:in `singleton_inline'
from /usr/lib/ruby/gems/2.2.0/gems/ffi-inline-0.0.4.3/lib/ffi/inline/inline.rb:39:in `inline'
View ffi-inline.log
g++ -shared -fPIC -o /tmp/.ffi-inline-1000/00ac1de4050b632b230475bd71c0dc3a7de45a89.so /tmp/.ffi-inline-1000/00ac1de4050b632b230475bd71c0dc3a7de45a89.cpp -ltesseract 2>>/tmp/.ffi-inline-1000/00ac1de4050b632b230475bd71c0dc3a7de45a89.log
/usr/lib/ruby/gems/2.2.0/gems/tesseract-ocr-0.1.8/lib/tesseract/c/baseapi.rb: In function ‘void set_image(tesseract::TessBaseAPI*, const Pix*)’:
/usr/lib/ruby/gems/2.2.0/gems/tesseract-ocr-0.1.8/lib/tesseract/c/baseapi.rb:171:22: error: invalid conversion from ‘const Pix*’ to ‘Pix*’ [-fpermissive]
api->SetImage(pix);
^
In file included from /tmp/.ffi-inline-1000/00ac1de4050b632b230475bd71c0dc3a7de45a89.cpp:1:0:
/usr/include/tesseract/baseapi.h:354:8: note: initializing argument 1 of ‘void tesseract::TessBaseAPI::SetImage(Pix*)’
void SetImage(Pix* pix);
^
/usr/lib/ruby/gems/2.2.0/gems/tesseract-ocr-0.1.8/lib/tesseract/c/baseapi.rb: In function ‘bool process_pages(tesseract::TessBaseAPI*, const char*, STRING*)’:
@atuyosi
atuyosi / kihon_kanji_list_jisx0208.txt
Last active January 20, 2016 10:11
JIS X 0208 KANJI List (only KANJI)
View kihon_kanji_list_jisx0208.txt
# JIS基本漢字のリスト(非漢字を除く)第1水準漢字および第2水準漢字
# トータル6355字
@atuyosi
atuyosi / kanji_list_jisx0213.txt
Created January 21, 2016 07:58
JIS X 0213 KANJI List (Only KANJI)
View kanji_list_jisx0213.txt
# JIS X 0213 漢字リスト(非漢字を除く)
𠀋
@atuyosi
atuyosi / joyo_kanji_list.txt
Created February 16, 2016 12:06
常用漢字1945字のリスト(異体字は含まず)
View joyo_kanji_list.txt
@atuyosi
atuyosi / jisx0213_with_level.tsv
Last active February 16, 2016 15:14
JISX0213漢字のリスト(水準情報付きタブ区切りテキスト)
View jisx0213_with_level.tsv
第三水準
𠀋 第三水準
第三水準
第三水準
第三水準
第三水準
第三水準
第三水準
第三水準
仿 第三水準