Compare commits

..

40 Commits

Author SHA1 Message Date
Robin-Charles GUIHENEUF
52e029602c aliases: Add bin and .local/bin to PATH 2022-11-18 17:12:39 +01:00
Robin-Charles GUIHENEUF
d187a2870d aliases: Make aliases tolerant to main branch in git 2022-11-18 17:12:39 +01:00
f6d786cf37 navi: Update docker-compose sheet 2022-11-18 17:12:39 +01:00
f07885a997 navi: Update docker sheet 2022-11-18 17:12:39 +01:00
7146741005 navi: Update misc sheet 2022-11-18 17:12:39 +01:00
641175e365 navi: Update compression sheet 2022-11-18 17:12:39 +01:00
f024379c64 codium: Remove useless keybinding 2022-11-18 17:12:39 +01:00
f4a48d7f8a codium: Export Android SDK environment viariables 2022-11-18 17:12:39 +01:00
1e9efe1d56 aliases: Use code as default 2022-11-18 17:12:39 +01:00
a68dcaf784 aliases: Remove personal zephyr includes 2022-11-18 17:12:39 +01:00
8fa9a66ef3 codium: Update configuration 2022-11-18 17:12:39 +01:00
f3141f85c0 navi: Add reinstall cheat 2022-11-18 17:12:39 +01:00
6614722246 aliases: Add NPC helpers 2022-11-18 17:12:39 +01:00
73473b3c05 navi: Add helpers (compare & bluetooth) 2022-11-18 17:12:39 +01:00
759792da66 aliases: Add NAS project 2022-11-18 17:12:39 +01:00
fdcc2bd369 codium: Add lower case keybinding 2022-11-18 17:12:39 +01:00
17a3a6a147 config: Add font installation in GUI 2022-11-18 17:12:39 +01:00
77ad52f31d codium: Misc configuration 2022-11-18 17:12:39 +01:00
fb4feef7aa terminator: Change font 2022-11-18 17:12:39 +01:00
3012e354cd navi: Add meld cheat sheet 2022-11-18 17:12:39 +01:00
38ae30a5cd codium: Change editor font 2022-11-18 17:12:39 +01:00
d31e0651cb navi: Add nextcloud sheet 2022-11-18 17:12:39 +01:00
01bf1a804d navi: Add some IP helpers 2022-11-18 17:12:39 +01:00
4c1700b2c4 navi: Add git tag helpers 2022-11-18 17:12:39 +01:00
4f2093042a navi: Add freqtrade cheat sheet 2022-11-18 17:12:39 +01:00
fc7dc0c9e2 aliases: Add micro alias 2022-11-18 17:12:39 +01:00
18fb933a84 navi: Add some cheat sheets 2022-11-18 17:12:39 +01:00
b107998b5b install: Add micro editor install 2022-11-18 17:12:39 +01:00
71876b6afb alias: Add git profile switch aliases 2022-11-18 17:12:39 +01:00
95f4bfb6db navi: Add nginx cheat sheet 2022-11-18 17:12:39 +01:00
ebed5ccb2f navi: Add syncapi debug cheatsheets 2022-11-18 17:12:39 +01:00
bbd04fd66a aliases: Introduce git_parent and associated rebase aliases 2022-11-18 17:12:39 +01:00
7a5c3a66e2 aliases: General cleanup 2022-11-18 17:12:39 +01:00
bf2ea53cf9 zsh: Add completion for Makefile implicit targets 2022-11-18 17:12:39 +01:00
df69aface3 zsh: Add preexec & precmd hook to vulporuza theme 2022-11-18 17:12:39 +01:00
8df85821b4 aliases: Add Netatmo path to PATH variable 2022-11-18 17:12:39 +01:00
1faa2204dc aliases: Add git amend alias to amend commits automatically 2022-11-18 17:12:39 +01:00
d724ee2a58 terminator: Include configuration file 2022-11-18 17:12:39 +01:00
d96c2c4f99 codium: Migration from Nextcloud 2022-11-18 17:12:39 +01:00
60a35066df navi: Migration from Nextcloud 2022-11-18 17:12:39 +01:00
6 changed files with 57 additions and 20 deletions

View File

@ -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)

View File

@ -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}'

View File

@ -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}'

View File

@ -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

View File

@ -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

View File

@ -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"