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
| gzip | |
| 圧縮 | |
| #元ファイルは消える | |
| gzip a.txt | |
| #元ファイル残す | |
| gzip -c a.txt > a.gz | |
| 展開 | |
| #元ファイルは消える |
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
| https://github.com/mikel/mail/blob/master/spec/spec_helper.rb |
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
| http://qiita.com/hnakamur/items/d3e32045af17bfe6e215 | |
| Ruggedに説明がありますが、以下のように指定します。 | |
| gem 'rugged', git: 'git://github.com/libgit2/rugged.git', branch: 'development', submodules: true | |
| submodules: trueの指定によってlibgit2をgithubから取得してコンパイルするようになっています。最初この指定を忘れていたら、homebrewで入れたlibgit2 0.20.0を使ってコンパイルエラーになってしまいました。 | |
| あとはbundleでruggedをインストールします。 |
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
| diff --git a/config/environments/production.rb b/config/environments/production.rb | |
| index a8836c3..b93a877 100644 | |
| --- a/config/environments/production.rb | |
| +++ b/config/environments/production.rb | |
| @@ -32,7 +32,7 @@ Rails.application.configure do | |
| # Generate digests for assets URLs. | |
| config.assets.digest = true | |
| - # `config.assets.precompile` has moved to config/initializers/assets.rb | |
| + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb |
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
| cmd = 'git add' | |
| pid = Process.fork do | |
| Process.exec [cmd, cmd] # コマンド実行 | |
| end | |
| Process.waitall # 子プロセスの終了待ち | |
| git cat-file -p 317ed615a10c9e |
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
| http://d.hatena.ne.jp/murank/20110327/1301224770 | |
| git reset | |
| --soft HEADの位置のみを変更する。インデックス、ワーキングツリーには影響なし。 | |
| --mixed(default) HEADの位置とインデックスを変更する。ワーキングツリーには影響なし。 | |
| --hard HEADの位置、インデックス、ワーキングツリーをすべて変更する。 | |
| git reset --soft HEAD -> HEAD の位置を HEAD に変更し、インデックス、ワーキングツリーはそのままにする。つまり何も変わらない。 | |
| git reset --soft HEAD^ -> HEAD の位置が HEAD^ に移動するだけ。 コミットすると --amend した同じ |
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
| #まぁBASIC認証なんてもう使わないだろうけど、他の用途で使う時のメモ | |
| url = 'http://www.example.com' | |
| user = 'moko' | |
| pass = 'boke' | |
| url =~ /\Ahttps?:\/\// | |
| "#{$&}#{user}:#{pass}@#{$'}" | |
| #=> "http://moko:boke@www.example.com" |
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
| desc 'うんたら' | |
| task :kantara do | |
| puts 'hoge' | |
| end | |
| task :before do | |
| puts 'before' | |
| end | |
| task :after 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
| #belongs_to 1 | |
| class Entry < ActiveRecord::Base | |
| belongs_to :user | |
| end | |
| FactoryGirl.define do | |
| factory :user do | |
| name 'name' | |
| end |
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
| sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel | |
| git clone git://github.com/ariya/phantomjs.git | |
| cd phantomjs | |
| git tag | |
| git branch | |
| git checkout 1.9 | |
| #超時間かかる数時間コース? | |
| ./build.sh |