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 -e | |
| ## TMP_DIRを作成 & TMP_DIRを消してから死ね | |
| TEMP_DIR=$(mktemp -d "/tmp/tmp_${0##*/}.XXXXX") | |
| TEMP_DIR_SUFFIX=$(basename ${TEMP_DIR} | cut -c 5-) | |
| trap "rm -rf /tmp/tmp_${TEMP_DIR_SUFFIX}" EXIT | |
| trap "rm -rf /tmp/tmp_${TEMP_DIR_SUFFIX}; exit 1" INT PIPE TERM | |
| #echo ${TEMP_DIR_SUFFIX} |
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
| my $str = "a + (b * (3 / (c + 5)))"; | |
| $str =~ /\(((?:[^()]++|(?R))*)\)/; | |
| # /\( \)/; # 括弧にマッチ | |
| # ( ) # 後方参照 | |
| # (?:[^()]++|(?R))* # 括弧以外のバックトラックなしの貪欲マッチ または全体のパターンにマッチ(再帰) | |
| print $1; ## "b * (3 / (c + 5))" |
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 | |
| # Description: | |
| # GIT_SSH wrapper for github "deploy key" solution | |
| # | |
| # Usage: | |
| # 1. create ssh key in .ssh/deploy_key/${YOUR_REPO}/id_rsa{,.pub} | |
| # 2. register the created ssh key as deploy key | |
| # 3. GIT_SSH=~/.ssh/git_ssh git pull origin master | |
| set -eu | |
| [ ${SET_X:-false} = true ] && set -x |
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 | |
| # - (...) はサブプロセス実行 | |
| # - & をつけるとコマンドをバックグラウンドプロセスとして起動する | |
| # - wait ですべてのバックグラウンドプロセスを待機 | |
| # - waitにプロセスidを渡すと指定したプロセスが終了するまで待機したうえで指定プロセスの戻り値を返す | |
| # - プロセスidを渡さない場合、すべての子プロセスを待つが終了ステータスはつねに0になる。 | |
| # - 子プロセスが0以外を返しても親プロセスはそれを検知できないので子プロセスの死亡を見て親プロセスを殺すのが難しい | |
| # - プロセスidを複数渡すことはできない | |
| ( |
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
| [alias] | |
| ################## | |
| ## git graph | |
| ## | |
| ## git logの短縮版。グラフとブランチ名と日付、コミッタを表示 | |
| ## git logのデフォルトはこんなん | |
| # graph = log --decorate --graph --pretty=\"format:%C(yellow)%h%C(auto)%d %Creset%s%Creset\" | |
| ## コメント+日付+author |
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
Show hidden characters
| { | |
| "plugins": [ | |
| "babel-plugin-empower-assert", | |
| "babel-plugin-espower", | |
| "babel-plugin-unassert" | |
| ] | |
| } |
OlderNewer