Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#!/bin/sh | |
# https://github.com/shyiko/ktlint pre-commit hook | |
git diff --name-only --cached --relative | grep '\.kt[s"]\?$' | xargs ktlint -F --relative . | |
if [ $? -ne 0 ]; then exit 1; else git add .; fi |
[alias] | |
# ronto stands for "rebase --onto". Uses the current branch to move it and updates the start-of-the-branch tag along | |
ronto = "!f() { \ | |
git rebase --onto $1 __start__$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --abbrev-ref HEAD); \ | |
git tag -d __start__$(git rev-parse --abbrev-ref HEAD); \ | |
git tag __start__$(git rev-parse --abbrev-ref HEAD) $1; \ | |
}; f" | |
# nb stands for "create branch". Creates a tag marking the start-of-the-branch | |
cb = "!f() { \ | |
git tag __start__$1; \ |
To run the script please follow these instructions:
CMD+Space
=> digit “Terminal” => press Enter
)curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
Enter
:
sudo bash ./zoomus_vaccine.sh
1
and press Enter
~/.git/hooks/
chmod +x ~/.git/hooks/pre-{commit,push}
git config --global core.hooksPath ~/.git/hooks