Skip to content

Instantly share code, notes, and snippets.

@k
Last active April 9, 2018 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k/2d9d281cbf1c7d501bd578779f2b18c7 to your computer and use it in GitHub Desktop.
Save k/2d9d281cbf1c7d501bd578779f2b18c7 to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://developer.github.com/v3/pulls/#create-a-pull-request
if [[ -f replace-l5d-proxy.vim ]]
then
echo "remove ./replace-l5d-proxy.vim"
exit 1
fi
echo "
:%s#linkerd-proxy\.digital\.theadsontop\.com:4142/\(.\+\):8080#localhost:9000/api/v1/namespaces/dev/services/\1:8080/proxy/
:wq
" > replace-l5d-proxy.vim
FIND=linkerd-proxy
for i in `ag -l $FIND --yaml`
do
nvim --headless -i NONE --noplugin -s replace-l5d-proxy.vim $i &
done
wait
rm replace-l5d-proxy.vim
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment