Compare commits

..

38 Commits

Author SHA1 Message Date
8371bab785 navi: Update docker-compose sheet 2022-03-08 09:04:34 +01:00
f5757ad5ef navi: Update docker sheet 2022-03-08 09:04:34 +01:00
cb8eb77b60 navi: Update misc sheet 2022-03-08 09:04:34 +01:00
d56540efb8 navi: Update compression sheet 2022-03-08 09:04:34 +01:00
e24ddc4cf8 codium: Remove useless keybinding 2022-03-08 08:27:31 +01:00
dda32a2a9b codium: Export Android SDK environment viariables 2022-03-08 08:27:31 +01:00
a59a378e8f aliases: Use code as default 2022-03-08 08:27:31 +01:00
2faef48c2b aliases: Remove personal zephyr includes 2022-03-08 08:27:31 +01:00
ec177bc4a4 codium: Update configuration 2022-03-08 08:27:31 +01:00
1f7951db4f navi: Add reinstall cheat 2022-03-08 08:27:31 +01:00
4791f009a1 aliases: Add NPC helpers 2022-03-08 08:27:31 +01:00
ab0365d4f2 navi: Add helpers (compare & bluetooth) 2022-03-08 08:27:30 +01:00
b1c1df74fa aliases: Add NAS project 2022-03-08 08:27:30 +01:00
a5dcc8efcc codium: Add lower case keybinding 2022-03-08 08:27:30 +01:00
9707678fdf config: Add font installation in GUI 2022-03-08 08:27:30 +01:00
f32006f445 codium: Misc configuration 2022-03-08 08:27:30 +01:00
f77fe4e6a0 terminator: Change font 2022-03-08 08:27:30 +01:00
6a0ad52e0d navi: Add meld cheat sheet 2022-03-08 08:27:30 +01:00
ddd042d6c0 codium: Change editor font 2022-03-08 08:27:30 +01:00
1e0db3b0b1 navi: Add nextcloud sheet 2022-03-08 08:27:30 +01:00
c4f932d67a navi: Add some IP helpers 2022-03-08 08:27:30 +01:00
7e45a05480 navi: Add git tag helpers 2022-03-08 08:27:30 +01:00
3699718ff7 navi: Add freqtrade cheat sheet 2022-03-08 08:27:30 +01:00
9cd669eab4 aliases: Add micro alias 2022-03-08 08:27:30 +01:00
cd7dcf47fd navi: Add some cheat sheets 2022-03-08 08:27:30 +01:00
f9ceefc1dd install: Add micro editor install 2022-03-08 08:27:30 +01:00
457bd364ef alias: Add git profile switch aliases 2022-03-08 08:27:30 +01:00
7496d77a82 navi: Add nginx cheat sheet 2022-03-08 08:27:30 +01:00
97ecba93a5 navi: Add syncapi debug cheatsheets 2022-03-08 08:27:30 +01:00
ea769bc03c aliases: Introduce git_parent and associated rebase aliases 2022-03-08 08:27:29 +01:00
81fb25f379 aliases: General cleanup 2022-03-08 08:27:29 +01:00
34e2483138 zsh: Add completion for Makefile implicit targets 2022-03-08 08:27:29 +01:00
33a3a33d6d zsh: Add preexec & precmd hook to vulporuza theme 2022-03-08 08:27:29 +01:00
28fc337b34 aliases: Add Netatmo path to PATH variable 2022-03-08 08:27:29 +01:00
78881502a8 aliases: Add git amend alias to amend commits automatically 2022-03-08 08:27:29 +01:00
876256b24a terminator: Include configuration file 2022-03-08 08:27:29 +01:00
a840dded74 codium: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
208ef38f68 navi: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
6 changed files with 19 additions and 56 deletions

View File

@ -77,22 +77,18 @@ alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn"
alias gs='git status' alias gs='git status'
alias gc='git checkout' alias gc='git checkout'
alias gcm='git checkout master'
alias gpl='git pull' alias gpl='git pull'
alias gph='git push' alias gph='git push'
alias gsu='git submodule update --init' alias gsu='git submodule update --init'
alias gcp='git cherry-pick' 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 add='git add'
alias commit='git commit -m "To fixup"' alias commit='git commit -m "To fixup"'
alias cont='git rebase --continue' alias cont='git rebase --continue'
# Git cleaners # Git cleaners
alias branch_clean='git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d' 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' alias tag_clean='git tag -l | xargs git tag -d && git fetch -t'
function git_parent { function git_parent {
@ -156,16 +152,13 @@ function grbm {
# Save current branch # Save current branch
BRANCH=$(git branch | grep \* | cut -d ' ' -f2) BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
# Checkout master/main & pull # Checkout master & pull
gcm git checkout master
git pull git pull
# Save parent branch
PARENT=$(git branch | grep \* | cut -d ' ' -f2)
# Back to previous branch # Back to previous branch
git checkout ${BRANCH} git checkout ${BRANCH}
git rebase --interactive ${PARENT} git rebase --interactive master
} }
function grbi { function grbi {
@ -196,16 +189,8 @@ function ga {
} }
function gam { function gam {
# Checkout master/main & pull git autofixup master
gcm git rebase --interactive --autosquash master
# Save parent branch
PARENT=$(git branch | grep \* | cut -d ' ' -f2)
git checkout -
git autofixup ${PARENT}
git rebase --interactive --autosquash ${PARENT}
} }
function gai { function gai {
@ -347,12 +332,6 @@ export NETATMO_WORK_DIR=$HOME/Netatmo
# Cargo binaries (navi) # Cargo binaries (navi)
export PATH=$PATH:$HOME/.cargo/bin export PATH=$PATH:$HOME/.cargo/bin
# Python
export PATH=$PATH:$HOME/.local/bin
# User bin
export PATH=$HOME/bin:$PATH
# Navi # Navi
if [ -z "${ZSH}" ]; then if [ -z "${ZSH}" ]; then
source <(navi widget bash) source <(navi widget bash)

View File

@ -1,24 +1,20 @@
% compression % compression
# Create a tar archive # Create a tar archive containing files
tar cf <name>.tar <files> tar cf <name>.tar <files>
# Extract a tar archive
tar xf <tar_file>
# Create a tar archive with gz compression # Create a tar archive with gz compression
tar czf <name>.tar.gz <files> tar czf <name>.tar.gz <files>
# Extract a tar using gz compression # Extract a tar archive
tar xzf <targz_file> tar xf <tar_file>
# Create a gz archive # Create a gz archive containing files
gzip -9 -c <files> > <name>.gz gzip -9 -c <files> > <name>.gz
# Extract a gz archive # Extract a gz archive
gzip -d <gz_file> gzip -d <gz_file>
$ files: ls | awk -F: '{ print $1}' $ files: ls | awk -F: '{ print $1}'
$ tar_file: ls *.tar | awk -F: '{ print $1}' $ tar_file: ls *.{tar,tar.*} | awk -F: '{ print $1}'
$ targz_file: ls *.tar.gz | awk -F: '{ print $1}'
$ gz_file: ls *.gz | awk -F: '{ print $1}' $ gz_file: ls *.gz | awk -F: '{ print $1}'

View File

@ -12,10 +12,4 @@ sudo docker-compose -f <file> up -d --force-recreate
# Up and daemonze a compose YAML # Up and daemonze a compose YAML
sudo docker-compose -f <file> down 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}' $ file: ls *.yaml | awk '{print $1}'

View File

@ -38,7 +38,7 @@ sudo docker exec -it <container> bash
sudo docker exec -it <container> sh -c '<command>' sudo docker exec -it <container> sh -c '<command>'
# Print the last lines of a container's logs # Print the last lines of a container's logs
sudo docker logs --tail 100 <container> sudo docker logs --tail 100 <container> | less
# Print the last lines of a container's logs and following its logs # Print the last lines of a container's logs and following its logs
sudo docker logs --tail 100 <container> -f sudo docker logs --tail 100 <container> -f

View File

@ -24,9 +24,3 @@ $ target: echo "ATSAMR21E19A nRF52" | tr " " "\n"
<pyet>/zigbee/python_zigbee_interface.py -c <channel> <pyet>/zigbee/python_zigbee_interface.py -c <channel>
$ pyet: echo "$HOME/Netatmo/core/python-emb-tools/python/bin" $ pyet: echo "$HOME/Netatmo/core/python-emb-tools/python/bin"
% mac
# Get MAC infos
curl 'https://www.macvendorlookup.com/oui.php?mac=<mac>' | jq

View File

@ -1,22 +1,22 @@
% syncapi % syncapi
# SyncAPI Muller # SyncAPI Muller
<syncapi_path>/syncapiadmin.py --project muller -s <server> --endpoint <endpoint> --mac <gateway_mac> <syncapi_path>/syncapiadmin.py --project muller -s <server> --endpoint <endpoint> -c <syncapi_path>/muller_<server>.swp --mac <gateway_mac>
# SyncAPI Legrand # SyncAPI Legrand
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint <endpoint> --mac <gateway_mac> <syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint <endpoint> -c <syncapi_path>/legrand_<server>.swp --mac <gateway_mac>
# Debug parser Legrand # Debug parser Legrand
<debug_path>/debug_parser.py --project legrand -s <server> -r -pp -g <gateway_mac> <debug_path>/debug_parser.py --project legrand -s <server> -c <syncapi_path>/legrand_<server>.swp -r -pp -g <gateway_mac>
# Enable debug mode Legrand # Enable debug mode Legrand
<debug_path>/debug_config_setter.py --project legrand -s <server> -g <gateway_mac> -t NLG -ke debug_enabled <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 # Disable debug mode Legrand
<debug_path>/debug_config_setter.py --project legrand -s <server> -g <gateway_mac> -t NLG -kd debug_enabled <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 # Analyse diagnosis
<syncapi_path>/syncapiadmin.py --project legrand -s <server> --endpoint getdebuginfo --mac <gateway_mac> | jq -r .body.diagnosis_content | <release_path>/decode_diagnosis.py <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 # Paths
$ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin" $ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin"