Compare commits

..

42 Commits

Author SHA1 Message Date
vulporuza 8371bab785 navi: Update docker-compose sheet 2022-03-08 09:04:34 +01:00
vulporuza f5757ad5ef navi: Update docker sheet 2022-03-08 09:04:34 +01:00
vulporuza cb8eb77b60 navi: Update misc sheet 2022-03-08 09:04:34 +01:00
vulporuza d56540efb8 navi: Update compression sheet 2022-03-08 09:04:34 +01:00
vulporuza e24ddc4cf8 codium: Remove useless keybinding 2022-03-08 08:27:31 +01:00
vulporuza dda32a2a9b codium: Export Android SDK environment viariables 2022-03-08 08:27:31 +01:00
vulporuza a59a378e8f aliases: Use code as default 2022-03-08 08:27:31 +01:00
vulporuza 2faef48c2b aliases: Remove personal zephyr includes 2022-03-08 08:27:31 +01:00
vulporuza ec177bc4a4 codium: Update configuration 2022-03-08 08:27:31 +01:00
vulporuza 1f7951db4f navi: Add reinstall cheat 2022-03-08 08:27:31 +01:00
vulporuza 4791f009a1 aliases: Add NPC helpers 2022-03-08 08:27:31 +01:00
vulporuza ab0365d4f2 navi: Add helpers (compare & bluetooth) 2022-03-08 08:27:30 +01:00
vulporuza b1c1df74fa aliases: Add NAS project 2022-03-08 08:27:30 +01:00
vulporuza a5dcc8efcc codium: Add lower case keybinding 2022-03-08 08:27:30 +01:00
vulporuza 9707678fdf config: Add font installation in GUI 2022-03-08 08:27:30 +01:00
vulporuza f32006f445 codium: Misc configuration 2022-03-08 08:27:30 +01:00
vulporuza f77fe4e6a0 terminator: Change font 2022-03-08 08:27:30 +01:00
vulporuza 6a0ad52e0d navi: Add meld cheat sheet 2022-03-08 08:27:30 +01:00
vulporuza ddd042d6c0 codium: Change editor font 2022-03-08 08:27:30 +01:00
vulporuza 1e0db3b0b1 navi: Add nextcloud sheet 2022-03-08 08:27:30 +01:00
vulporuza c4f932d67a navi: Add some IP helpers 2022-03-08 08:27:30 +01:00
vulporuza 7e45a05480 navi: Add git tag helpers 2022-03-08 08:27:30 +01:00
vulporuza 3699718ff7 navi: Add freqtrade cheat sheet 2022-03-08 08:27:30 +01:00
vulporuza 9cd669eab4 aliases: Add micro alias 2022-03-08 08:27:30 +01:00
vulporuza cd7dcf47fd navi: Add some cheat sheets 2022-03-08 08:27:30 +01:00
vulporuza f9ceefc1dd install: Add micro editor install 2022-03-08 08:27:30 +01:00
vulporuza 457bd364ef alias: Add git profile switch aliases 2022-03-08 08:27:30 +01:00
vulporuza 7496d77a82 navi: Add nginx cheat sheet 2022-03-08 08:27:30 +01:00
vulporuza 97ecba93a5 navi: Add syncapi debug cheatsheets 2022-03-08 08:27:30 +01:00
vulporuza ea769bc03c aliases: Introduce git_parent and associated rebase aliases 2022-03-08 08:27:29 +01:00
vulporuza 81fb25f379 aliases: General cleanup 2022-03-08 08:27:29 +01:00
vulporuza 34e2483138 zsh: Add completion for Makefile implicit targets 2022-03-08 08:27:29 +01:00
vulporuza 33a3a33d6d zsh: Add preexec & precmd hook to vulporuza theme 2022-03-08 08:27:29 +01:00
vulporuza 28fc337b34 aliases: Add Netatmo path to PATH variable 2022-03-08 08:27:29 +01:00
vulporuza 78881502a8 aliases: Add git amend alias to amend commits automatically 2022-03-08 08:27:29 +01:00
vulporuza 876256b24a terminator: Include configuration file 2022-03-08 08:27:29 +01:00
vulporuza a840dded74 codium: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
vulporuza 208ef38f68 navi: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
vulporuza 0481018500 aliases: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
vulporuza 9c74c4aab5 zsh: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
vulporuza 678c1c7998 auto-config: Migration from Nextcloud 2022-03-08 08:27:29 +01:00
vulporuza 548aa1f990 Initial commit 2022-03-08 08:27:29 +01:00
11 changed files with 76 additions and 114 deletions
+37 -34
View File
@@ -77,22 +77,18 @@ 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|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'
function git_parent {
@@ -156,16 +152,13 @@ function grbm {
# Save current branch
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
# Checkout master/main & pull
gcm
# Checkout master & pull
git checkout master
git pull
# Save parent branch
PARENT=$(git branch | grep \* | cut -d ' ' -f2)
# Back to previous branch
git checkout ${BRANCH}
git rebase --interactive ${PARENT}
git rebase --interactive master
}
function grbi {
@@ -196,16 +189,8 @@ function ga {
}
function gam {
# 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}
git autofixup master
git rebase --interactive --autosquash master
}
function gai {
@@ -243,18 +228,33 @@ function git_perso {
# ║ ╦│ │ ╠═╣│││├┤ │││ ││
# ╚═╝┴ ┴ ╩ ╩┴ ┴└─┘┘└┘─┴┘
alias amend_pro="GIT_EDITOR=true git rebase --rebase-merges --exec 'git commit --amend --author=\"Robin-Charles GUIHENEUF <rguiheneuf@netatmo.com>\"' $1"
alias amend_perso="GIT_EDITOR=true git rebase --rebase-merges --exec 'git commit --amend --author=\"Robin-Charles Guihéneuf <robin-charles@hotmail.fr>\"' $1"
alias amend_pro="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles GUIHENEUF <rguiheneuf@netatmo.com>\"' $1"
alias amend_perso="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles Guihéneuf <robin-charles@hotmail.fr>\"' $1"
# ╦═╗┌─┐┌─┐┌─┐┌─┐┬┌┬┐┌─┐┬─┐┬┌─┐┌─┐
# ╠╦╝├┤ ├─┘│ │└─┐│ │ │ │├┬┘│├┤ └─┐
# ╩╚═└─┘┴ └─┘└─┘┴ ┴ └─┘┴└─┴└─┘└─┘
alias mulot='cd $HOME/mulot'
alias moki='cd $HOME/mulot/moki'
alias bc='cd $HOME/Netatmo/embedded/firmware-bitcloud'
alias fw='cd $HOME/Netatmo/embedded/firmware'
alias nmr='cd $HOME/Netatmo/embedded/nmr'
alias py='cd $HOME/Netatmo/core/python-emb-tools'
alias mag='cd $HOME/Netatmo/embedded/magellan'
alias nsp='cd $HOME/Netatmo/embedded/nsp'
alias nas='cd $HOME/Netatmo/embedded/nas'
alias npc='cd $HOME/Netatmo/embedded/npc'
alias mulot='cd $HOME/mulot/firmware'
# In editor
alias c_moki='c $HOME/mulot/moki.code-workspace'
alias c_bc='c $HOME/Netatmo/firmware-bitcloud.code-workspace'
alias c_fw='c $HOME/Netatmo/firmware.code-workspace'
alias c_nmr='c $HOME/Netatmo/nmr.code-workspace'
alias c_py='c $HOME/Netatmo/python-emb-tools.code-workspace'
alias c_mag='c $HOME/Netatmo/magellan.code-workspace'
alias c_nsp='c $HOME/Netatmo/nsp.code-workspace'
alias c_nas='c $HOME/Netatmo/nas.code-workspace'
alias c_npc='c $HOME/Netatmo/npc.code-workspace'
alias c_mulot='c $HOME/mulot/mulot.code-workspace'
# SSH keygen
function ssh_keygen {
@@ -270,7 +270,7 @@ function ssh_keygen {
# Flash sniffer nRF52
function nrf52 {
arm-none-eabi-objcopy -O ihex build/bin/$1 $1.hex
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/$1 $1.hex
nrfutil pkg generate --hw-version 52 --sd-req=0x00 --application $1.hex --application-version 1 $1.zip
if [ -z "$2" ]
@@ -317,18 +317,21 @@ fi
# ║╣ ┌┴┬┘├─┘│ │├┬┘ │
# ╚═╝┴ └─┴ └─┘┴└─ ┴
export PATH=$PATH:~/Netatmo/core/embedded-tools/Linux/flasher
export PATH=$PATH:~/Netatmo/core/generic-embedded/stm32_sbm
export PATH=$PATH:~/Netatmo/core/generic-embedded/stm32_dfu
export PATH=$PATH:~/Netatmo/embedded/firmware-bitcloud/toolchain/arm-none-eabi/bin
export PATH=$PATH:~/Netatmo/embedded/nmr/scripts/flash
# Autofixup
export PATH=$PATH:$HOME/.git-autofixup
# Netatmo
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)
+6
View File
@@ -61,6 +61,12 @@ cargo install navi
mkdir -p $HOME/.local/share/navi/cheats
ln -sfn $HOME/.dotfiles/navi/ $HOME/.local/share/navi/cheats/vulporuza
# Update pip
pip3 install --upgrade pip
# Install undervolt
sudo pip3 install undervolt
# Update npm
sudo npm install -g npm
+11 -4
View File
@@ -7,11 +7,18 @@ fi
# CLI Tools
$HOME/.dotfiles/auto-config-cli.sh
sudo apt install terminator fonts-firacode
# Codium
if [ ! -f "/etc/apt/sources.list.d/vscodium.list" ]
then
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
fi
mkdir -p $HOME/.config/Code/User/
ln -sf $HOME/.dotfiles/codium/keybindings.json $HOME/.config/Code/User/keybindings.json
ln -sf $HOME/.dotfiles/codium/settings.json $HOME/.config/Code/User/settings.json
sudo apt install terminator codium fonts-firacode
mkdir -p $HOME/.config/VSCodium/User/
ln -sf $HOME/.dotfiles/codium/keybindings.json $HOME/.config/VSCodium/User/keybindings.json
ln -sf $HOME/.dotfiles/codium/settings.json $HOME/.config/VSCodium/User/settings.json
mkdir -p $HOME/.config/terminator/
ln -sf $HOME/.dotfiles/terminator/config $HOME/.config/terminator/config
+1 -1
View File
@@ -17,7 +17,7 @@
},
"C_Cpp.formatting": "Disabled",
"C_Cpp.updateChannel": "Default",
"powermode.enabled": false,
"powermode.enabled": true,
"powermode.enableExplosions": true,
"powermode.maxExplosions": 1,
"editor.rulers": [
+5 -9
View File
@@ -1,24 +1,20 @@
% compression
# Create a tar archive
# Create a tar archive containing files
tar cf <name>.tar <files>
# Extract a tar archive
tar xf <tar_file>
# Create a tar archive with gz compression
tar czf <name>.tar.gz <files>
# Extract a tar using gz compression
tar xzf <targz_file>
# Extract a tar archive
tar xf <tar_file>
# Create a gz archive
# Create a gz archive containing files
gzip -9 -c <files> > <name>.gz
# Extract a gz archive
gzip -d <gz_file>
$ files: ls | awk -F: '{ print $1}'
$ tar_file: ls *.tar | awk -F: '{ print $1}'
$ targz_file: ls *.tar.gz | awk -F: '{ print $1}'
$ tar_file: ls *.{tar,tar.*} | awk -F: '{ print $1}'
$ gz_file: ls *.gz | awk -F: '{ print $1}'
+5 -11
View File
@@ -1,21 +1,15 @@
% docker-compose
# Up a compose YAML
sudo docker compose -f <file> up
sudo docker-compose -f <file> up
# Up and daemonze a compose YAML
sudo docker compose -f <file> up -d
sudo docker-compose -f <file> up -d
# Up and daemonze a compose YAML (force)
sudo docker compose -f <file> up -d --force-recreate
sudo docker-compose -f <file> up -d --force-recreate
# Down 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
# Up and daemonze a compose YAML
sudo docker-compose -f <file> down
$ file: ls *.yaml | awk '{print $1}'
+1 -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>
sudo docker logs --tail 100 <container> | less
# Print the last lines of a container's logs and following its logs
sudo docker logs --tail 100 <container> -f
-42
View File
@@ -1,42 +0,0 @@
% gpg
# GPG version
gpg --version
# GPG generate key
gpg --gen-key
# List keys
gpg --list-keys
# Export public key
gpg --output <filename> --export <gpg_public_keys>
# Export public key as ASCII
gpg --output <filename> --export --armor <gpg_public_keys>
# Import public key
gpg --import <gpg_files>
# Encrypt document
gpg --output <filename> --encrypt --recipient <gpg_public_keys> <files>
# Decrypt document
gpg --output <filename> --decrypt <files>
# Make a signature
gpg --output <signature_file> --sign <files>
# Verify signature
gpg --verify <files>
# Clearsign documents
gpg --clearsign <filename>
# Detach signature
gpg --output <filename_sig> --detach-sig <filename>
$ files: ls * | awk '{print $1}'
$ gpg_files: ls *.gpg | awk '{print $1}'
$ gpg_public_keys: gpg --list-keys | grep uid | sed 's/.*<\(.*\)>.*/\1/' | awk '{print $1}'
-6
View File
@@ -24,9 +24,3 @@ $ 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
+6 -6
View File
@@ -1,22 +1,22 @@
% syncapi
# 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_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_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
<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
<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
<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
$ syncapi_path: echo "$HOME/Netatmo/core/python-emb-tools/python/bin/syncapiadmin"
+4
View File
@@ -1,14 +1,18 @@
[global_config]
window_state = maximise
scroll_tabbar = True
title_inactive_bg_color = "#000000"
inactive_color_offset = 1.0
enabled_plugins = TerminalShot, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
title_use_system_font = False
title_font = Fira Code weight=453 11
[keybindings]
[profiles]
[[default]]
background_darkness = 0.7
background_type = transparent
cursor_color = "#908c8c"
font = Fira Code weight=453 11
foreground_color = "#ffffff"
scrollback_infinite = True