Compare commits
40 Commits
8371bab785
...
52e029602c
Author | SHA1 | Date | |
---|---|---|---|
|
52e029602c | ||
|
d187a2870d | ||
f6d786cf37 | |||
f07885a997 | |||
7146741005 | |||
641175e365 | |||
f024379c64 | |||
f4a48d7f8a | |||
1e9efe1d56 | |||
a68dcaf784 | |||
8fa9a66ef3 | |||
f3141f85c0 | |||
6614722246 | |||
73473b3c05 | |||
759792da66 | |||
fdcc2bd369 | |||
17a3a6a147 | |||
77ad52f31d | |||
fb4feef7aa | |||
3012e354cd | |||
38ae30a5cd | |||
d31e0651cb | |||
01bf1a804d | |||
4c1700b2c4 | |||
4f2093042a | |||
fc7dc0c9e2 | |||
18fb933a84 | |||
b107998b5b | |||
71876b6afb | |||
95f4bfb6db | |||
ebed5ccb2f | |||
bbd04fd66a | |||
7a5c3a66e2 | |||
bf2ea53cf9 | |||
df69aface3 | |||
8df85821b4 | |||
1faa2204dc | |||
d724ee2a58 | |||
d96c2c4f99 | |||
60a35066df |
@ -77,18 +77,22 @@ alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn"
|
||||
|
||||
alias gs='git status'
|
||||
alias gc='git checkout'
|
||||
alias gcm='git checkout master'
|
||||
alias gpl='git pull'
|
||||
alias gph='git push'
|
||||
alias gsu='git submodule update --init'
|
||||
alias gcp='git cherry-pick'
|
||||
|
||||
function gcm {
|
||||
( git rev-parse --verify origin/master > /dev/null 2>&1 ) && git checkout master
|
||||
( git rev-parse --verify origin/main > /dev/null 2>&1 ) && git checkout main
|
||||
}
|
||||
|
||||
alias add='git add'
|
||||
alias commit='git commit -m "To fixup"'
|
||||
alias cont='git rebase --continue'
|
||||
|
||||
# Git cleaners
|
||||
alias branch_clean='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
|
||||
alias branch_clean='git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d'
|
||||
alias tag_clean='git tag -l | xargs git tag -d && git fetch -t'
|
||||
|
||||
function git_parent {
|
||||
@ -152,13 +156,16 @@ function grbm {
|
||||
# Save current branch
|
||||
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
|
||||
|
||||
# Checkout master & pull
|
||||
git checkout master
|
||||
# Checkout master/main & pull
|
||||
gcm
|
||||
git pull
|
||||
|
||||
# Save parent branch
|
||||
PARENT=$(git branch | grep \* | cut -d ' ' -f2)
|
||||
|
||||
# Back to previous branch
|
||||
git checkout ${BRANCH}
|
||||
git rebase --interactive master
|
||||
git rebase --interactive ${PARENT}
|
||||
}
|
||||
|
||||
function grbi {
|
||||
@ -189,8 +196,16 @@ function ga {
|
||||
}
|
||||
|
||||
function gam {
|
||||
git autofixup master
|
||||
git rebase --interactive --autosquash master
|
||||
# Checkout master/main & pull
|
||||
gcm
|
||||
|
||||
# Save parent branch
|
||||
PARENT=$(git branch | grep \* | cut -d ' ' -f2)
|
||||
|
||||
git checkout -
|
||||
|
||||
git autofixup ${PARENT}
|
||||
git rebase --interactive --autosquash ${PARENT}
|
||||
}
|
||||
|
||||
function gai {
|
||||
@ -332,6 +347,12 @@ export NETATMO_WORK_DIR=$HOME/Netatmo
|
||||
# Cargo binaries (navi)
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
|
||||
# Python
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
|
||||
# User bin
|
||||
export PATH=$HOME/bin:$PATH
|
||||
|
||||
# Navi
|
||||
if [ -z "${ZSH}" ]; then
|
||||
source <(navi widget bash)
|
||||
|
@ -1,20 +1,24 @@
|
||||
% compression
|
||||
|
||||
# Create a tar archive containing files
|
||||
# Create a tar archive
|
||||
tar cf <name>.tar <files>
|
||||
|
||||
# Create a tar archive with gz compression
|
||||
tar czf <name>.tar.gz <files>
|
||||
|
||||
# Extract a tar archive
|
||||
tar xf <tar_file>
|
||||
|
||||
# Create a gz archive containing files
|
||||
# Create a tar archive with gz compression
|
||||
tar czf <name>.tar.gz <files>
|
||||
|
||||
# Extract a tar using gz compression
|
||||
tar xzf <targz_file>
|
||||
|
||||
# Create a gz archive
|
||||
gzip -9 -c <files> > <name>.gz
|
||||
|
||||
# Extract a gz archive
|
||||
gzip -d <gz_file>
|
||||
|
||||
$ files: ls | awk -F: '{ print $1}'
|
||||
$ tar_file: ls *.{tar,tar.*} | awk -F: '{ print $1}'
|
||||
$ tar_file: ls *.tar | awk -F: '{ print $1}'
|
||||
$ targz_file: ls *.tar.gz | awk -F: '{ print $1}'
|
||||
$ gz_file: ls *.gz | awk -F: '{ print $1}'
|
||||
|
@ -12,4 +12,10 @@ sudo docker-compose -f <file> up -d --force-recreate
|
||||
# Up and daemonze a compose YAML
|
||||
sudo docker-compose -f <file> down
|
||||
|
||||
# Print the last lines of compose YAML logs
|
||||
sudo docker-compose -f <file> logs --tail 100
|
||||
|
||||
# Print the last lines of compose YAML logs and following its logs
|
||||
sudo docker-compose -f <file> logs --tail 100 -f
|
||||
|
||||
$ file: ls *.yaml | awk '{print $1}'
|
||||
|
@ -38,7 +38,7 @@ sudo docker exec -it <container> bash
|
||||
sudo docker exec -it <container> sh -c '<command>'
|
||||
|
||||
# Print the last lines of a container's logs
|
||||
sudo docker logs --tail 100 <container> | less
|
||||
sudo docker logs --tail 100 <container>
|
||||
|
||||
# Print the last lines of a container's logs and following its logs
|
||||
sudo docker logs --tail 100 <container> -f
|
||||
|
@ -24,3 +24,9 @@ $ target: echo "ATSAMR21E19A nRF52" | tr " " "\n"
|
||||
<pyet>/zigbee/python_zigbee_interface.py -c <channel>
|
||||
|
||||
$ pyet: echo "$HOME/Netatmo/core/python-emb-tools/python/bin"
|
||||
|
||||
|
||||
% mac
|
||||
|
||||
# Get MAC infos
|
||||
curl 'https://www.macvendorlookup.com/oui.php?mac=<mac>' | jq
|
||||
|
@ -1,22 +1,22 @@
|
||||
% syncapi
|
||||
|
||||
# SyncAPI Muller
|
||||
<syncapi_path>/syncapiadmin.py --project muller -s <server> --endpoint <endpoint> -c <syncapi_path>/muller_<server>.swp --mac <gateway_mac>
|
||||
<syncapi_path>/syncapiadmin.py --project muller -s <server> --endpoint <endpoint> --mac <gateway_mac>
|
||||
|
||||
# SyncAPI Legrand
|
||||
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint <endpoint> -c <syncapi_path>/legrand_<server>.swp --mac <gateway_mac>
|
||||
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint <endpoint> --mac <gateway_mac>
|
||||
|
||||
# Debug parser Legrand
|
||||
<debug_path>/debug_parser.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -r -pp -g <gateway_mac>
|
||||
<debug_path>/debug_parser.py --project legrand -s <server> -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
|
||||
<debug_path>/debug_config_setter.py --project legrand -s <server> -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
|
||||
<debug_path>/debug_config_setter.py --project legrand -s <server> -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
|
||||
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint getdebuginfo --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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user