Compare commits
4 Commits
05c74ef79d
...
ce3043c7e7
Author | SHA1 | Date | |
---|---|---|---|
|
ce3043c7e7 | ||
f107fb7703 | |||
bc3856dd22 | |||
60e77bb0e3 |
@ -90,6 +90,28 @@ alias cont='git rebase --continue'
|
||||
alias branch_clean='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
|
||||
alias tag_clean='git tag -l | xargs git tag -d && git fetch -t'
|
||||
|
||||
function git_parent {
|
||||
git log --pretty=format:"%D" | \
|
||||
grep -v "^$" | \
|
||||
sed "s/, /\n/g" | \
|
||||
grep -v "HEAD" | \
|
||||
grep -v `git rev-parse --abbrev-ref HEAD` | \
|
||||
grep -v "tag" | \
|
||||
head -n1 | \
|
||||
sed "s/origin\/\([^,]*\)/\1/"
|
||||
}
|
||||
|
||||
function git_parent_tag {
|
||||
git log --pretty=format:"%D" | \
|
||||
grep -v "^$" | \
|
||||
sed "s/, /\n/g" | \
|
||||
grep -v "HEAD" | \
|
||||
grep -v `git rev-parse --abbrev-ref HEAD` | \
|
||||
head -n1 | \
|
||||
sed "s/origin\/\([^,]*\)/\1/" | \
|
||||
sed "s/tag: \([^,]*\)/\1/"
|
||||
}
|
||||
|
||||
alias log='git log --graph --decorate --oneline'
|
||||
|
||||
# Branch
|
||||
@ -125,33 +147,43 @@ function grb {
|
||||
git rebase --interactive HEAD~$1
|
||||
}
|
||||
|
||||
function grbm {
|
||||
function grbi {
|
||||
# Save current branch
|
||||
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
|
||||
|
||||
# Checkout master & pull
|
||||
git checkout master
|
||||
# Save parent branch
|
||||
PARENT=$(git_parent)
|
||||
|
||||
# Checkout parent & pull
|
||||
git checkout ${PARENT}
|
||||
git pull
|
||||
|
||||
echo "Rebasing on" ${PARENT}
|
||||
|
||||
# Back to previous branch
|
||||
git checkout ${BRANCH}
|
||||
git rebase --interactive master
|
||||
git rebase --interactive ${PARENT}
|
||||
}
|
||||
|
||||
function grbr {
|
||||
function grbroot {
|
||||
git rebase --interactive --autosquash --root
|
||||
}
|
||||
|
||||
function gam {
|
||||
git autofixup master
|
||||
git rebase --interactive --autosquash master
|
||||
}
|
||||
|
||||
function ga {
|
||||
git autofixup HEAD~$1
|
||||
git rebase --interactive --autosquash HEAD~$1
|
||||
}
|
||||
|
||||
function gai {
|
||||
# Save parent branch
|
||||
PARENT=$(git_parent)
|
||||
|
||||
echo "Rebasing with autofixup on" ${PARENT}
|
||||
|
||||
git autofixup ${PARENT}
|
||||
git rebase --interactive --autosquash ${PARENT}
|
||||
}
|
||||
|
||||
# ╔═╗┬┌┬┐ ╔═╗┌┬┐┌─┐┌┐┌┌┬┐
|
||||
# ║ ╦│ │ ╠═╣│││├┤ │││ ││
|
||||
# ╚═╝┴ ┴ ╩ ╩┴ ┴└─┘┘└┘─┴┘
|
||||
|
10
navi/nginx.cheat
Normal file
10
navi/nginx.cheat
Normal file
@ -0,0 +1,10 @@
|
||||
% nginx
|
||||
|
||||
# Enable site
|
||||
ln -s /etc/nginx/sites-available/<ls_site> /etc/nginx/sites-enabled/<ls_site>
|
||||
|
||||
# Disable site
|
||||
rm /etc/nginx/sites-enabled/<rm_site>
|
||||
|
||||
$ ls_site: ls /etc/nginx/sites-available/ | awk '{print $1}'
|
||||
$ rm_site: ls /etc/nginx/sites-enabled/ | awk '{print $1}'
|
@ -9,9 +9,19 @@
|
||||
# Debug parser Legrand
|
||||
<debug_path>/debug_parser.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -r -pp -g <gateway_mac>
|
||||
|
||||
# Enable debug mode Legrand
|
||||
<debug_path>/debug_config_setter.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -g <gateway_mac> -t NLG -ke debug_enabled
|
||||
|
||||
# Disable debug mode Legrand
|
||||
<debug_path>/debug_config_setter.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -g <gateway_mac> -t NLG -kd debug_enabled
|
||||
|
||||
# Analyse diagnosis
|
||||
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint getdebuginfo -c <syncapi_path>/legrand_<server>.swp --mac <gateway_mac> | jq -r .body.diagnosis_content | <release_path>/decode_diagnosis.py
|
||||
|
||||
# Paths
|
||||
$ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin"
|
||||
$ debug_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/debug"
|
||||
$ release_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/release"
|
||||
|
||||
# Variables
|
||||
$ server: echo "prod inte" | tr " " "\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user