Skip to content

Instantly share code, notes, and snippets.

@t-oginogin
t-oginogin / file0.txt
Created April 20, 2014 12:14
ゲノム解析用ソフトVICUNAをコンパイルする ref: http://qiita.com/t_oginogin/items/79f6af5bee9ba86b622c
OS:Ubuntu 12.04 LTS 64bit
@t-oginogin
t-oginogin / file0.txt
Created April 22, 2014 08:58
Nginxで同じサーバーに複数のIP address用の証明書を配置する ref: http://qiita.com/t_oginogin/items/c6a95a9d61424141dff3
local address:xxx.xxx.xxx.xxx
global address:yyy.yyy.yyy.yyy
@t-oginogin
t-oginogin / file0.txt
Last active August 29, 2015 14:00
Railsでタグをエスケープしつつ、改行を含む複数行のTextを表示したい ref: http://qiita.com/t_oginogin/items/0164ad76b753fdff9902
<%= simple_format(text) %>
@t-oginogin
t-oginogin / file0.txt
Created April 25, 2014 22:58
RailsのRAILS_ENVに自分の環境を追加する ref: http://qiita.com/t_oginogin/items/181a45bfb17fede1655d
$ bundle install
$ bundle exec rake db:migrate RAILS_ENV=development_user
$ bundle exec rails s -e development_user
@t-oginogin
t-oginogin / vagrant.md
Created April 26, 2014 23:34
Vagrant VMのディスクサイズを後から拡張する方法

UbuntuにRubyとchef-soloをインストール

sudo apt-get update
sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install build-essential
sudo apt-get install zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev

cd /usr/src/

sudo wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz

@t-oginogin
t-oginogin / page.rb
Created April 30, 2014 11:03
ThinReportsのリストでページ内にあと何行追加できるか調べたい ref: http://qiita.com/t_oginogin/items/f510d5d2fcd331e0c0ee
module ThinReports
module Core::Shape
class List::Page < Basic::Interface
def rest_row_count
height = manager.current_page_state.height
row_height = manager.current_page_state.format.section_height(:detail)
max_height = manager.page_max_height
row_count = (height / row_height).floor
max_row_count = (max_height / row_height).floor
@t-oginogin
t-oginogin / file0.txt
Created May 2, 2014 10:55
Rails MiniTestでCSVファイルを返すControllerをテストしたい ref: http://qiita.com/t_oginogin/items/04018fd9eb9507e2bec8
def create_csv
<略>
respond_to do |format|
format.csv {
send_data records.to_csv, :type => 'text/csv', :filename => 'test.csv'
return
}
end
end
@t-oginogin
t-oginogin / file0.txt
Created May 3, 2014 23:15
Bowtie2を使って、参照塩基配列と一致した配列を抽出、一致しなかった配列を抽出する ref: http://qiita.com/t_oginogin/items/3a890fd3fceaeff8a2d3
$ cd ~/research/
$ wget http://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.2/bowtie2-2.2.2-linux-x86_64.zip
$ unzip bowtie2-2.2.2-linux-x86_64.zip
@t-oginogin
t-oginogin / file2.txt
Created May 10, 2014 00:49
factory_girl_railsで生成したオブジェクトを破壊的メソッドで変更する場合の注意点 ref: http://qiita.com/t_oginogin/items/e5bd1e452d0c4ab714e1
$ bundle exec rake test
Run options: --seed 59117
# Running tests:
[index]report no:R00002
[index]report no:R00003
[index]report no:R00004
[index]report no:R00005
[index]report no:R00006