command | description |
---|---|
zi | 折り畳みの有効無効の切り替え |
zf | 折り畳みを作成する |
za | 折り畳みの開け閉め |
zd | 折り畳みを削除する |
zA | 折り畳みの開け閉め(再帰) |
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
% cargo --version | |
cargo-0.18.0-nightly (fdfdb5f 2017-02-16) |
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
# ローカルのポート13306で上がっているmysqlにテーブル指定でデータのみ(-t)ダンプした結果をgzipで固める(スキーマ含める場合は-t抜くだけ) | |
# ロックする場合 --single-transaction | |
mysqldump -h127.0.0.1 -P13306 -uXXX -pYYYY -t databasename table1 table2 tableN | gzip > compressed_dump_file_name.sql.gz | |
# gzipになっているmysqlのダンプファイルからloadする | |
# ローカルでテーブル指定でデータのみダンプする | |
gzcat compressed_dump_file_name.sql.gz | mysql -h127.0.0.1 -P13306 -uXXX -pYYY databasename | |
> mysqldump: Couldn't execute 'SELECT COLUMN_NAME, |
何パターンかやり方があるが普段下記の「元リポジトリ」で作業していて(つまりローカルに環境がある)バックアップやミラーとして下記の「mirror先リポジトリ」を使いたいケース(つまりミラー先はローカルにcloneしない)
[email protected]:pocari/vim-denite-gists.git
[email protected]:caffepocari/test-mirror-vim-denite-gists.git
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
class Hoge | |
include ActiveModel::Model | |
attr_accessor :name | |
validates :name, presence: true | |
validate :on_piyo_validate, on: :piyo | |
def on_piyo_validate | |
p :run_on_piyo_validat | |
errors[:base] << "hogehogehoge" |
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
bash-3.2$ cat -n test.rb | |
1 # stop at before loop | |
2 # and break (or conditional break) | |
3 # e.g) | |
4 # > break 8 if i >= 18 | |
5 # and run continue. then stop at next binding.pry | |
6 binding.pry | |
7 1.upto(20).each do |i| | |
8 p i | |
9 end |
DelaydJobで起動用の bin/delayed_job
を引数 run
でフォアグラウンド起動すると binding.pry の箇所で止まるが入力できないのでそのメモ
bin/rails runner "Delayed::Worker.new.start"
でワーカを立ち上げると pry がきちんと使える
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
set display-panes-time 10000 |
swap-pane -t 入れ替えたいpane番号
で今いるpaneと -t で指定したpaneを入れ替える