Skip to content

Instantly share code, notes, and snippets.

@junjanjon
Last active September 29, 2020 10:02
Show Gist options
  • Save junjanjon/5f84ee635cc798674b479a70c2592692 to your computer and use it in GitHub Desktop.
Save junjanjon/5f84ee635cc798674b479a70c2592692 to your computer and use it in GitHub Desktop.
二回以上使ったスニペット

ruby ワンライナーサーバ

ruby -rwebrick -e 'WEBrick::HTTPServer.new(:DocumentRoot => "./", :Port => 8888).start'

swagger mock サーバ

docker run --rm -it -p 4010:4010 -v $(pwd):/tmp stoplight/prism:3 mock -h 0.0.0.0 /tmp/area.yml

別名にしてコピー

ls | awk '{print $1" "$1 }' | gsed -e 's/tmp/whole/2' | xargs -t -n 2 -P4 bash -c 'cp $0 $1'

ローカルにインストールしていないけど使いたいコマンドを docker で実行する

# dotnet
docker run --rm -v $(pwd):/var/project mcr.microsoft.com/dotnet/core/sdk:3.1 /bin/bash -c "cd /var/project; dotnet run --project ..."

ruby などの version 指定時にも使っている。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment