Skip to content

Instantly share code, notes, and snippets.

# Dockerfile
RUN \
set -xeuv &&\
bundle --version &&\
gem uninstall bundler &&\
gem install -i /tmp/bundler bundler -v 2.0.1 &&\
ls -al /tmp/bundler/gems/bundler-2.0.1/exe/bundle &&\
/tmp/bundler/gems/bundler-2.0.1/exe/bundle --version &&\
bundle --version
@m-yamashita
m-yamashita / ASGからその配下のインスタンス一覧を取得する
Last active March 11, 2016 02:01
AWS CLIのレスポンス処理は jq 使う前に --query オプションの利用を考えてみよう! ref: http://qiita.com/m-yamashita/items/74dbcbf029a9324b7952
aws --output text autoscaling describe-auto-scaling-instances \
--query 'AutoScalingInstances[?AutoScalingGroupName==`awseb-e-hogehoge-stack-AWSEBAutoScalingGroup-FUGAFUGA`].InstanceId'
@m-yamashita
m-yamashita / file0.txt
Created June 15, 2015 15:02
ほんのちょっとの工夫だけで、一歩便利なシェル生活(とその例) ref: http://qiita.com/m-yamashita/items/331e3b2634f33b349cc1
alias gs="git status"
@m-yamashita
m-yamashita / file0.txt
Last active June 8, 2016 16:34
初心者向け、「上手い」シェルスクリプトの書き方メモ ref: http://qiita.com/m-yamashita/items/889c116b92dc0bf4ea7d
: > foo.log # ファイルを 0 バイトで上書き
@m-yamashita
m-yamashita / file0.txt
Created November 3, 2014 11:38
ここまで出来る!Vimの(ちょっと高度な)正規表現と検索/置換テクニック ref: http://qiita.com/m-yamashita/items/5755ca2717c8d5be57e4
Examples:
after: \v \m \M \V matches ~
'magic' 'nomagic'
$ $ $ \$ matches end-of-line
. . \. \. matches any character
* * \* \* any number of the previous atom
() \(\) \(\) \(\) grouping into an atom
| \| \| \| separating alternatives
\a \a \a \a alphabetic character
\\ \\ \\ \\ literal backslash
@m-yamashita
m-yamashita / file0.txt
Last active August 29, 2015 14:05
開発時にMarkdownの表現とスタイルをまとめて一発でテストして確認できるスニペットを作ってみた。 ref: http://qiita.com/m-yamashita/items/3c9e169cbb7581157800
# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5
@m-yamashita
m-yamashita / .vimrc
Created March 20, 2014 00:27
Vimで検索を行った際に必ずカーソルを画面中央に持ってくる方法 ref: http://qiita.com/m-yamashita/items/28ce6f90b1d3fdc2eb24
nmap n nzz
nmap N Nzz
nmap * *zz
nmap # #zz
@m-yamashita
m-yamashita / file0.txt
Created March 18, 2014 00:24
指定した階層分だけディレクトリを遡れるようにするためのコマンド "up" ref: http://qiita.com/m-yamashita/items/9a9adf1e1d7219284049
up 3