Compare commits
38 Commits
52e029602c
...
8371bab785
Author | SHA1 | Date | |
---|---|---|---|
8371bab785 | |||
f5757ad5ef | |||
cb8eb77b60 | |||
d56540efb8 | |||
e24ddc4cf8 | |||
dda32a2a9b | |||
a59a378e8f | |||
2faef48c2b | |||
ec177bc4a4 | |||
1f7951db4f | |||
4791f009a1 | |||
ab0365d4f2 | |||
b1c1df74fa | |||
a5dcc8efcc | |||
9707678fdf | |||
f32006f445 | |||
f77fe4e6a0 | |||
6a0ad52e0d | |||
ddd042d6c0 | |||
1e0db3b0b1 | |||
c4f932d67a | |||
7e45a05480 | |||
3699718ff7 | |||
9cd669eab4 | |||
cd7dcf47fd | |||
f9ceefc1dd | |||
457bd364ef | |||
7496d77a82 | |||
97ecba93a5 | |||
ea769bc03c | |||
81fb25f379 | |||
34e2483138 | |||
33a3a33d6d | |||
28fc337b34 | |||
78881502a8 | |||
876256b24a | |||
a840dded74 | |||
208ef38f68 |
192
.bash_aliases
192
.bash_aliases
@ -1,19 +1,29 @@
|
||||
export CONFIG_DIR="$HOME/.dotfiles"
|
||||
|
||||
# Refresh
|
||||
# ╦═╗┌─┐┌─┐┬─┐┌─┐┌─┐┬ ┬
|
||||
# ╠╦╝├┤ ├┤ ├┬┘├┤ └─┐├─┤
|
||||
# ╩╚═└─┘└ ┴└─└─┘└─┘┴ ┴
|
||||
|
||||
if [ -z "${ZSH}" ]; then
|
||||
alias refresh=". $HOME/.bashrc"
|
||||
else
|
||||
alias refresh=". $HOME/.zshrc"
|
||||
fi
|
||||
|
||||
# Nautilus
|
||||
alias open="nautilus ."
|
||||
# ╦┌┐┌┌─┐┌┬┐┌─┐┬ ┬
|
||||
# ║│││└─┐ │ ├─┤│ │
|
||||
# ╩┘└┘└─┘ ┴ ┴ ┴┴─┘┴─┘
|
||||
|
||||
# Install scripts
|
||||
alias install_cli="$CONFIG_DIR/auto-config-cli.sh"
|
||||
alias install_gui="$CONFIG_DIR/auto-config.sh"
|
||||
|
||||
# ╔╦╗╦╔═╗╔═╗
|
||||
# ║║║║╚═╗║
|
||||
# ╩ ╩╩╚═╝╚═╝
|
||||
|
||||
# Nautilus
|
||||
alias open="nautilus ."
|
||||
|
||||
# Go to config directory
|
||||
alias config="cd $CONFIG_DIR"
|
||||
|
||||
@ -24,7 +34,8 @@ function config_update {
|
||||
}
|
||||
|
||||
# Editor
|
||||
alias c='codium'
|
||||
alias c='code'
|
||||
alias e='micro'
|
||||
|
||||
# Find
|
||||
alias find='find . -name'
|
||||
@ -52,33 +63,65 @@ function s_clean {
|
||||
s_on
|
||||
}
|
||||
|
||||
# Make
|
||||
alias mk='make -j5'
|
||||
alias mec='make'
|
||||
alias mecque='make'
|
||||
|
||||
# VPN
|
||||
alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn"
|
||||
|
||||
# Git
|
||||
alias gst='git status'
|
||||
# ╔═╗┬┌┬┐ ╔═╗┬ ┬┌─┐┌─┐┌─┐┌─┐
|
||||
# ║ ╦│ │ ╠═╣│ │├─┤└─┐├┤ └─┐
|
||||
# ╚═╝┴ ┴ ╩ ╩┴─┘┴┴ ┴└─┘└─┘└─┘
|
||||
|
||||
alias gs='git status'
|
||||
alias gc='git checkout'
|
||||
alias gcm='git checkout master'
|
||||
alias gpl='git pull'
|
||||
alias gph='git push'
|
||||
alias pull='git pull'
|
||||
alias push='git push'
|
||||
alias gsu='git submodule update --init'
|
||||
alias gcp='git cherry-pick'
|
||||
|
||||
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 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
|
||||
function branch_create {
|
||||
git checkout -b $1
|
||||
git push -u origin $1
|
||||
}
|
||||
|
||||
# Tag
|
||||
alias tag_clean='git tag -l | xargs git tag -d && git fetch -t'
|
||||
|
||||
# Tag helpers
|
||||
function tag_create {
|
||||
git tag $1
|
||||
git push origin $1
|
||||
@ -91,18 +134,22 @@ function tag_replace {
|
||||
git push origin $1
|
||||
}
|
||||
|
||||
function grb {
|
||||
git rebase -i HEAD~$1
|
||||
}
|
||||
|
||||
function g_save {
|
||||
git add *
|
||||
git commit -m "[skip ci] Save: do not merge"
|
||||
git push -f
|
||||
}
|
||||
|
||||
# ╔═╗┬┌┬┐ ╦═╗┌─┐┌┐ ┌─┐┌─┐┌─┐
|
||||
# ║ ╦│ │ ╠╦╝├┤ ├┴┐├─┤└─┐├┤
|
||||
# ╚═╝┴ ┴ ╩╚═└─┘└─┘┴ ┴└─┘└─┘
|
||||
|
||||
function grb {
|
||||
git rebase --interactive HEAD~$1
|
||||
}
|
||||
|
||||
function grbm {
|
||||
# Save actual branch
|
||||
# Save current branch
|
||||
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
|
||||
|
||||
# Checkout master & pull
|
||||
@ -111,39 +158,102 @@ function grbm {
|
||||
|
||||
# Back to previous branch
|
||||
git checkout ${BRANCH}
|
||||
git rebase -i master
|
||||
git rebase --interactive master
|
||||
}
|
||||
|
||||
function grbr {
|
||||
function grbi {
|
||||
# Save current branch
|
||||
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
|
||||
|
||||
# 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 ${PARENT}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
# Repositories
|
||||
function gam {
|
||||
git autofixup master
|
||||
git rebase --interactive --autosquash master
|
||||
}
|
||||
|
||||
function gai {
|
||||
# Save parent branch
|
||||
PARENT=$(git_parent)
|
||||
|
||||
echo "Rebasing with autofixup on ${PARENT}"
|
||||
|
||||
git autofixup ${PARENT}
|
||||
git rebase --interactive --autosquash ${PARENT}
|
||||
}
|
||||
|
||||
# ╔═╗┬┌┬┐ ╔═╗┬─┐┌─┐┌─┐┬┬ ┌─┐
|
||||
# ║ ╦│ │ ╠═╝├┬┘│ │├┤ ││ ├┤
|
||||
# ╚═╝┴ ┴ ╩ ┴└─└─┘└ ┴┴─┘└─┘
|
||||
|
||||
function git_config {
|
||||
echo "User: $(git config user.name)"
|
||||
echo "Mail: $(git config user.email)"
|
||||
}
|
||||
|
||||
function git_pro {
|
||||
git config --global user.name "Robin-Charles GUIHENEUF"
|
||||
git config --global user.email rguiheneuf@netatmo.com
|
||||
git_config
|
||||
}
|
||||
|
||||
function git_perso {
|
||||
git config --global user.name "Robin-Charles Guihéneuf"
|
||||
git config --global user.email robin-charles@hotmail.fr
|
||||
git_config
|
||||
}
|
||||
|
||||
# ╔═╗┬┌┬┐ ╔═╗┌┬┐┌─┐┌┐┌┌┬┐
|
||||
# ║ ╦│ │ ╠═╣│││├┤ │││ ││
|
||||
# ╚═╝┴ ┴ ╩ ╩┴ ┴└─┘┘└┘─┴┘
|
||||
|
||||
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 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'
|
||||
|
||||
# Repositories in editor
|
||||
# In editor
|
||||
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
|
||||
@ -154,6 +264,10 @@ function ssh_keygen {
|
||||
cd -
|
||||
}
|
||||
|
||||
# ╔╗╔┌─┐┌┬┐┌─┐┌┬┐┌┬┐┌─┐
|
||||
# ║║║├┤ │ ├─┤ │ ││││ │
|
||||
# ╝╚╝└─┘ ┴ ┴ ┴ ┴ ┴ ┴└─┘
|
||||
|
||||
# Flash sniffer nRF52
|
||||
function nrf52 {
|
||||
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/$1 $1.hex
|
||||
@ -167,11 +281,6 @@ function nrf52 {
|
||||
fi
|
||||
}
|
||||
|
||||
# Make
|
||||
alias mk='make -j5'
|
||||
alias mec='make'
|
||||
alias mecque='make'
|
||||
|
||||
# app.S
|
||||
function generate_objdump {
|
||||
arm-none-eabi-objdump -S $1.elf > app.S
|
||||
@ -188,6 +297,10 @@ alias py_wireshark='$HOME/Netatmo/core/python-emb-tools/python/bin/zigbee/python
|
||||
alias stflash='sudo stm32_sbm -f app.bin -s 0x1000 -d'
|
||||
alias stflash_dfu='stm32_dfu -f app-jtag.bin -b'
|
||||
|
||||
# ╔═╗┬┌┬┐ ╔═╗┬─┐┌─┐┌┬┐┌─┐┌┬┐
|
||||
# ║ ╦│ │ ╠═╝├┬┘│ ││││├─┘ │
|
||||
# ╚═╝┴ ┴ ╩ ┴└─└─┘┴ ┴┴ ┴
|
||||
|
||||
# Git prompt
|
||||
if [ -z "${ZSH}" ]; then
|
||||
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
||||
@ -200,6 +313,16 @@ else
|
||||
fi
|
||||
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
|
||||
|
||||
@ -216,8 +339,5 @@ else
|
||||
source <(navi widget zsh)
|
||||
fi
|
||||
|
||||
# Zephyr
|
||||
[ -f $HOME/mulot/firmware/zephyr/zephyr-env.sh ] && source $HOME/mulot/firmware/zephyr/zephyr-env.sh
|
||||
|
||||
# West
|
||||
export WEST_DIR=$HOME/mulot/firmware/.west/west
|
||||
export ANDROID_HOME=~/Android/Sdk
|
||||
export ANDROID_NDK_HOME=~/Android/Sdk/ndk-bundle
|
||||
|
3
.zshrc
3
.zshrc
@ -75,6 +75,9 @@ plugins=(
|
||||
# zsh-history-substring-search
|
||||
)
|
||||
|
||||
zstyle ':completion:*:make:*:targets' call-command true
|
||||
zstyle ':completion:*:make:*' tag-order 'targets'
|
||||
|
||||
source $HOME/.bash_aliases
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
@ -73,3 +73,10 @@ sudo npm install -g npm
|
||||
# Install rebase-editor
|
||||
sudo npm install -g rebase-editor
|
||||
git config --global sequence.editor rebase-editor
|
||||
|
||||
# Install micro
|
||||
curl https://getmic.ro | bash
|
||||
mkdir -p $HOME/.config/micro
|
||||
ln -sfn $HOME/.dotfiles/micro/bindings.json $HOME/.config/micro/bindings.json
|
||||
ln -sfn $HOME/.dotfiles/micro/settings.json $HOME/.config/micro/settings.json
|
||||
sudo mv micro /usr/bin
|
||||
|
@ -14,8 +14,11 @@ then
|
||||
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
|
||||
|
||||
sudo apt install codium
|
||||
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
|
||||
|
39
codium/keybindings.json
Normal file
39
codium/keybindings.json
Normal file
@ -0,0 +1,39 @@
|
||||
// Placer vos combinaisons de touches dans ce fichier pour remplacer les valeurs par défaut
|
||||
[
|
||||
{
|
||||
"key": "ctrl+[Backslash]",
|
||||
"command": "workbench.action.navigateBack"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+u",
|
||||
"command": "editor.action.transformToUppercase"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+l",
|
||||
"command": "editor.action.transformToLowercase"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+[BracketRight]",
|
||||
"command": "workbench.action.navigateForward"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+8",
|
||||
"command": "-workbench.action.navigateForward"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+l",
|
||||
"command": "-workbench.view.explorer"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+[Quote]",
|
||||
"command": "workbench.action.openWorkspace"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w",
|
||||
"command": "-editor.action.addSelectionToNextFindMatch"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w",
|
||||
"command": "-editor.action.smartSelect.expand"
|
||||
}
|
||||
]
|
70
codium/settings.json
Normal file
70
codium/settings.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"editor.insertSpaces": true,
|
||||
"editor.tabSize": 2,
|
||||
"editor.detectIndentation": true,
|
||||
"editor.mouseWheelScrollSensitivity": 2,
|
||||
"editor.formatOnPaste": false,
|
||||
"editor.formatOnSave": false,
|
||||
"editor.formatOnType": true,
|
||||
"editor.renderWhitespace": "all",
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.watcherExclude":{
|
||||
"**/.git/objects/**": true,
|
||||
"**/.git/subtree-cache/**": true,
|
||||
"**/build/**": true,
|
||||
"**/.venv": true
|
||||
},
|
||||
"C_Cpp.formatting": "Disabled",
|
||||
"C_Cpp.updateChannel": "Default",
|
||||
"powermode.enabled": true,
|
||||
"powermode.enableExplosions": true,
|
||||
"powermode.maxExplosions": 1,
|
||||
"editor.rulers": [
|
||||
100
|
||||
],
|
||||
"telemetry.telemetryLevel": "off",
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
"explorer.confirmDelete": false,
|
||||
"window.titleBarStyle": "custom",
|
||||
"window.zoomLevel": 0,
|
||||
"gitlens.keymap": "alternate",
|
||||
"gitlens.advanced.messages": {
|
||||
"suppressCommitHasNoPreviousCommitWarning": false,
|
||||
"suppressCommitNotFoundWarning": false,
|
||||
"suppressFileNotUnderSourceControlWarning": false,
|
||||
"suppressGitVersionWarning": false,
|
||||
"suppressLineUncommittedWarning": false,
|
||||
"suppressNoRepositoryWarning": false
|
||||
},
|
||||
"workbench.colorTheme": "Monokai",
|
||||
"editor.largeFileOptimizations": false,
|
||||
"editor.suggestSelection": "first",
|
||||
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
|
||||
"C_Cpp.intelliSenseEngine": "Tag Parser",
|
||||
"diffEditor.ignoreTrimWhitespace": true,
|
||||
"git.autorefresh": false,
|
||||
"editor.fontFamily": "'Fira Code Retina', 'Droid Sans Mono' , 'monospace', 'Droid Sans Fallback'",
|
||||
"editor.fontLigatures": true,
|
||||
"editor.fontSize": 14,
|
||||
"editor.lineHeight": 20,
|
||||
"autoDocstring.docstringFormat": "sphinx",
|
||||
"security.workspace.trust.untrustedFiles": "open",
|
||||
"workbench.editorAssociations": {
|
||||
"*.ipynb": "jupyter.notebook.ipynb"
|
||||
},
|
||||
"cmake.configureOnOpen": true,
|
||||
"editor.guides.bracketPairs": true,
|
||||
"devicetree.zephyr": "zephyr",
|
||||
"powermode.shake.enabled": false,
|
||||
"powermode.explosions.size": 10,
|
||||
"powermode.explosions.frequency": 1,
|
||||
"powermode.explosions.offset": 0.5,
|
||||
"powermode.explosions.customExplosions": [
|
||||
"data:image/gif;base64,R0lGODlhWgBaAPIHAP///wAAAOvg4P7e3v/ExFpZWfW4uAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/gNHNDQAIfkECQoABwAsAAAAAFoAWgAAA/94utz+MMpJq7046827/2AojmRpnmiqrmzrvnAsz/RL3MSB57W6/7deCvgToog74xGpHAKbviR0xZtar9hUIFDaZgMAgBe0DXOv4LD4vCmrxdb0G66Rv9lN+WCgxh+2gIELdnt9U2l7iWZ/bnNmjYmFdHlhkXuAjpmPlnyTSoiRdpqaAZaLUKCdo6tzip5GoKyyrZ1+sLO4mba3ormyu7C9vqNjccO+wELCx8RozLnJNMvPpIfU0NbXs9Ey09p3qHOB3sfcL3YBBerq5HeBupSVpo4G9Y7p6wW95i5683P1DGjiJO7Tm3++CIK7pQZhLoWGGH6T52qhsonb4uEqkKjUwDB+LdrNWVcuHMZH6LJhlMPSmDuR4gAoAgMyBss+H2UWSlMTBk2dfGCauUcHECowM5ERXRPRYExc+4ZavPh0my4xBTX2EcC1K1eoUl9RneO1a7lTJjOZZUYTi1ClPc+dzOp2blNndsWmnRvXZ169e1dmUfAWal+5dovh5Xs45F/FKhl/ydu2buLGji8PDiBgrgDMIb9O/Dx4kFdmZUGfK8u6tWvV57a4nv05dWkGnD+P2827cxjStwmrAW4hDfHgubn2TA7bp9EMz4NLn069unUMCQAAIfkECQoABwAsFAAKAC4ATAAAA/94utxN8EDiqr126oi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KAAcALBgADAAoAEoAAAP/eLrcR/BFR6uVMM/Lq/5d6HyaaCpkdp4psZrpy5by7Nbrje98XwXA4CVIBFqKhwBguRQugsxo06iARoFSJjHLnSq5WMBgrO2ay+P0ABBIitXnOFNNbivh8jzeviTn/2lsT2J/hW+CVYaKiIOLf20MX45ykImTeZVul5iNm3GQkp5noFlFhaZXlloFrKyhZgGtrlJhc3RcBrlcdGtar7y4ulnAvlK3isRTxniGx8WimK/QXXyFBWkFp6p/rYak07CdW+CVX6HSk5luAXDon+Pqbu2Kr1QNX37usIGM96Xeb3rF29YEIK0fnqQN1MdEgMOHEAVQo8CwYcSH4RxUjBLxYhNFcA0XglwiQOTIfp1Amhy5UuXHky3JvWQ506XGkygJTou5s2ZPn9AG6kx4BGTJIxKhORRaBaKjiEybXpxKFWJUqQ8DVN1qD2nIImCLWA2htcmJsmY7aF16dizZriKIUEgAADs="
|
||||
],
|
||||
"powermode.explosions.backgroundMode": "image",
|
||||
"powermode.explosions.gifMode": "continue",
|
||||
"powermode.explosions.explosionOrder": "random",
|
||||
"powermode.explosions.duration": 415
|
||||
}
|
4
micro/bindings.json
Normal file
4
micro/bindings.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Alt-/": "lua:comment.comment",
|
||||
"CtrlUnderscore": "lua:comment.comment"
|
||||
}
|
1
micro/settings.json
Normal file
1
micro/settings.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
20
navi/compression.cheat
Normal file
20
navi/compression.cheat
Normal file
@ -0,0 +1,20 @@
|
||||
% compression
|
||||
|
||||
# Create a tar archive containing files
|
||||
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
|
||||
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}'
|
||||
$ gz_file: ls *.gz | awk -F: '{ print $1}'
|
15
navi/docker-compose.cheat
Normal file
15
navi/docker-compose.cheat
Normal file
@ -0,0 +1,15 @@
|
||||
% docker-compose
|
||||
|
||||
# Up a compose YAML
|
||||
sudo docker-compose -f <file> up
|
||||
|
||||
# Up and daemonze a compose YAML
|
||||
sudo docker-compose -f <file> up -d
|
||||
|
||||
# Up and daemonze a compose YAML (force)
|
||||
sudo docker-compose -f <file> up -d --force-recreate
|
||||
|
||||
# Up and daemonze a compose YAML
|
||||
sudo docker-compose -f <file> down
|
||||
|
||||
$ file: ls *.yaml | awk '{print $1}'
|
46
navi/docker.cheat
Normal file
46
navi/docker.cheat
Normal file
@ -0,0 +1,46 @@
|
||||
% docker
|
||||
|
||||
# Create a volume
|
||||
sudo docker volume create <name>
|
||||
|
||||
# List all volumes
|
||||
sudo docker volume ls
|
||||
|
||||
# Remove volume
|
||||
sudo docker volume rm <volume>
|
||||
|
||||
$ volume: sudo docker volume ls --format "{{.Name}}" | awk '{print $1}'
|
||||
|
||||
# Create new network
|
||||
docker network create <name>
|
||||
|
||||
# List the networks
|
||||
sudo docker network ls
|
||||
|
||||
# Remove volume
|
||||
sudo docker volume rm <network>
|
||||
|
||||
$ network: sudo docker network ls --format "{{.Name}}" | awk '{print $1}'
|
||||
|
||||
# List the running containers
|
||||
sudo docker ps
|
||||
|
||||
# Stop a running container through SIGTERM
|
||||
sudo docker stop <container>
|
||||
|
||||
# Stop a running container through SIGKILL
|
||||
sudo docker kill <container>
|
||||
|
||||
# Execute bash on a running container
|
||||
sudo docker exec -it <container> bash
|
||||
|
||||
# Execute a command on a running container
|
||||
sudo docker exec -it <container> sh -c '<command>'
|
||||
|
||||
# Print the last lines of a container's logs
|
||||
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
|
||||
|
||||
$ container: sudo docker container ls --format "{{.Names}}" | awk '{print $1}'
|
15
navi/freqtrade.cheat
Normal file
15
navi/freqtrade.cheat
Normal file
@ -0,0 +1,15 @@
|
||||
% freqtrade
|
||||
|
||||
# Backtest a strategy on timerange
|
||||
sudo docker-compose run --rm freqtrade backtesting --timerange=20200901-20201001 -s <strategy>
|
||||
|
||||
# Download data on timerange
|
||||
sudo docker-compose run --rm freqtrade download-data --timerange=20200901-20201001
|
||||
|
||||
# Plot data on timerange
|
||||
sudo docker-compose run --rm freqtrade plot-dataframe --timerange=20200901-20201001 -s <strategy>
|
||||
|
||||
# List strategies
|
||||
sudo docker-compose run --rm freqtrade list-strategies
|
||||
|
||||
$ strategy: ls user_data/strategies | grep "\.py" | sed -e "s/\.py//g" | awk '{print $1}'
|
71
navi/git.cheat
Normal file
71
navi/git.cheat
Normal file
@ -0,0 +1,71 @@
|
||||
% git
|
||||
|
||||
# Initializes a git repository
|
||||
git init
|
||||
|
||||
# Clone a git repository
|
||||
git clone <repository> <clone_directory>
|
||||
|
||||
# Rebase upstream master into local/origin master
|
||||
git fetch <remote_name>
|
||||
git checkout master
|
||||
git rebase <remote_name>/master
|
||||
git fetch origin
|
||||
git push -f origin master
|
||||
|
||||
# Merge upstream master into local/origin master
|
||||
git fetch <remote_name>
|
||||
git checkout master
|
||||
git merge <remote_name>/master
|
||||
git fetch origin
|
||||
git push -f origin master
|
||||
|
||||
# Adds a remote for a git repository
|
||||
git remote add <remote_name> <remote_url>
|
||||
|
||||
# Renames a remote for a git repository
|
||||
git remote rename <old_remote_name> <new_remote_name>
|
||||
|
||||
# Remove a remote for a git repository
|
||||
git remote remove <remote_name>
|
||||
|
||||
# Saves the changes to a file in a commit
|
||||
git commit -m <message>
|
||||
|
||||
# Pushes committed changes to remote repository
|
||||
git push --set-upstream <remote_name> <branch_name>
|
||||
|
||||
# Displays formatted log of commits for a repo
|
||||
git log --all --decorate --oneline --graph
|
||||
|
||||
# Clear everything
|
||||
git clean -dxf
|
||||
|
||||
# Add a new module
|
||||
git submodule add <repository> <path>
|
||||
|
||||
# Update module
|
||||
git submodule update --init
|
||||
|
||||
# Update module without init
|
||||
git submodule update
|
||||
|
||||
# Pull all submodules
|
||||
git submodule foreach git pull origin master
|
||||
|
||||
# Skip git hooks
|
||||
git commit --no-verify
|
||||
|
||||
# Create new branch from current HEAD
|
||||
git checkout -b <new_branch_name>
|
||||
|
||||
# Create and push tag
|
||||
git tag <name>
|
||||
git push origin <name>
|
||||
|
||||
# Delete and push tag
|
||||
git tag -d <tag_name>
|
||||
git push -d origin <tag_name>
|
||||
|
||||
# Variables
|
||||
$ tag_name: git tag -l | awk '{print $1}'
|
40
navi/make.cheat
Normal file
40
navi/make.cheat
Normal file
@ -0,0 +1,40 @@
|
||||
% make-stm
|
||||
# Log
|
||||
make <product><job> FIRMWARE_VERSION=<version> FORCE_TRACE=y MULTI_JOBS=y SECRET=<secret>
|
||||
# No log
|
||||
make <product><job> FIRMWARE_VERSION=<version> MULTI_JOBS=y SECRET=<secret>
|
||||
# Variables
|
||||
$ product: echo "nlg nlg-stm32 nmr nmr-stm32" | tr " " "\n"
|
||||
$ job: echo " .clean .reflash" | tr " " "\n"
|
||||
$ secret: echo "c702ca256060d168bb4fffa2ecacb0e4 f6676952ded14a3c5bed81c756d4eebc" | tr " " "\n"
|
||||
|
||||
|
||||
% make-samr
|
||||
# Log
|
||||
make <product><job> APP_VERSION=<version> APP_USE_CHANNEL=11 FACTORY_TEST=y ENABLE_TRACE_SUPPORT=y RTT=y MULTI_JOBS=y
|
||||
# No log
|
||||
make <product><job> APP_VERSION=<version> APP_USE_CHANNEL=11 FACTORY_TEST=y MULTI_JOBS=y
|
||||
# Variables
|
||||
$ product: make -qp | awk -F":" "/^n[a-zA-Z0-9][^$#\/\t=\.]*:([^=]|$)/ { split(\$1,A,/ /); for(i in A)print A[i] }"
|
||||
$ job: echo " .clean .reflash" | tr " " "\n"
|
||||
|
||||
|
||||
% get-line-stm
|
||||
# STM
|
||||
arm-none-eabi-addr2line -e $HOME/Netatmo/embedded/magellan/apps/user/nlg-stm32/app.elf
|
||||
# Variables
|
||||
$ product: echo "nlg nlg-stm32 nmr nmr-stm32" | tr " " "\n"
|
||||
|
||||
|
||||
% get-line-samr
|
||||
# SAMR
|
||||
arm-none-eabi-addr2line -e $HOME/Netatmo/embedded/magellan/apps/user/<product>/*.elf
|
||||
# Variables
|
||||
$ product: make -qp | awk -F":" "/^n[a-zA-Z0-9][^$#\/\t=\.]*:([^=]|$)/ { split(\$1,A,/ /); for(i in A)print A[i] }"
|
||||
% parser
|
||||
|
||||
|
||||
# NLG Model parser
|
||||
flasher -dumpflashatoffset <nlg_dumped_bin> 0x460000 0x40000 && <nlg_parser> <nlg_dumped_bin>
|
||||
# Variables
|
||||
$ nlg_parser: echo "$HOME/Netatmo/embedded/magellan/apps/user/nlg-stm32/model_parser/nlg_model_parser"
|
69
navi/misc.cheat
Normal file
69
navi/misc.cheat
Normal file
@ -0,0 +1,69 @@
|
||||
% misc
|
||||
|
||||
# Update system
|
||||
sudo apt update && sudo apt upgrade
|
||||
|
||||
# Clean APT
|
||||
sudo apt autoclean && sudo apt autoremove
|
||||
|
||||
# Reinstall package
|
||||
sudo apt reinstall ./<deb>
|
||||
|
||||
# List users
|
||||
cat /etc/passwd | awk -F: '{ print $1}'
|
||||
|
||||
# User information
|
||||
sudo id <user>
|
||||
|
||||
# Change user password
|
||||
sudo passwd <user>
|
||||
|
||||
# Create user with home
|
||||
sudo useradd -m <username>
|
||||
|
||||
# Create user without home
|
||||
sudo useradd <username>
|
||||
|
||||
# Delete an user
|
||||
sudo deluser <user>
|
||||
|
||||
# List all groups
|
||||
cat /etc/group
|
||||
|
||||
# Add user to group
|
||||
sudo usermod -a -G <group> <user>
|
||||
|
||||
# Remove user from a group
|
||||
sudo deluser <user> <group>
|
||||
|
||||
# List port bindings
|
||||
sudo lsof -i -P -n | grep LISTEN
|
||||
|
||||
# Show binding on a port
|
||||
sudo lsof -i:<port>
|
||||
|
||||
# Get IP on interface
|
||||
ip addr show dev <interface> | grep "inet " | sed "s/ *inet \([^ ]*\) .*/\1/" | awk -F: '{ print $1}'
|
||||
|
||||
# Get devices on interface
|
||||
nmap -sP <ip>
|
||||
|
||||
# Compare 2 files (meld)
|
||||
meld <(hexdump -C <file_1>) <(hexdump -C <file_2>)
|
||||
|
||||
# Compare 2 files (bcompare)
|
||||
bcompare <file_1> <file_2>
|
||||
|
||||
# Replace expression in files
|
||||
ack -rl "<expression>" | xargs sed -i 's#<expression>#<replace_expression>#g'
|
||||
|
||||
# Disable Bluetooth ERTM
|
||||
sudo bash -c "echo Y > /sys/module/bluetooth/parameters/disable_ertm"
|
||||
|
||||
$ user: cat /etc/passwd | awk -F: '{ print $1}'
|
||||
$ group: cat /etc/group | awk -F: '{ print $1}'
|
||||
$ interface: ip link | grep "^[0-9]*:" | sed "s/[0-9]*: \(.*\):.*/\1/" | awk -F: '{ print $1}'
|
||||
$ ip: ip addr show dev <interface> | grep "inet " | sed "s/ *inet \([^ ]*\) .*/\1/" | awk -F: '{ print $1}'
|
||||
$ file_1: ls | awk -F: '{ print $1}'
|
||||
$ file_2: ls | awk -F: '{ print $1}'
|
||||
$ deb: ls *.deb | awk -F: '{ print $1}'
|
10
navi/mysql.cheat
Normal file
10
navi/mysql.cheat
Normal file
@ -0,0 +1,10 @@
|
||||
% mysql
|
||||
|
||||
# Create database
|
||||
mysql -u <user> -p -e "create database <database> character set UTF8mb4 collate utf8mb4_bin"
|
||||
|
||||
# Export databse
|
||||
mysqldump -u <user> -p -x -A <database> > <file>
|
||||
|
||||
# Import database
|
||||
mysql -u <user> -p <database> <path>
|
26
navi/netatmo.cheat
Normal file
26
navi/netatmo.cheat
Normal file
@ -0,0 +1,26 @@
|
||||
% flasher
|
||||
|
||||
# Set server
|
||||
flasher -setserver nv2 <server>
|
||||
|
||||
$ server: echo "netcomv2.inte.netatmo.net nv2-nlg.netatmo.net nv2-nmg.netatmo.net upp.netatmo.net" | tr " " "\n"
|
||||
|
||||
|
||||
% jlink
|
||||
|
||||
# JLinkExe
|
||||
JLinkExe -if SWD -speed 1000 -device <target>
|
||||
|
||||
# JLinkGDBServer
|
||||
JLinkGDBServer -if SWD -device <target>
|
||||
|
||||
# Variables
|
||||
$ target: echo "ATSAMR21E19A nRF52" | tr " " "\n"
|
||||
|
||||
|
||||
% zigbee
|
||||
|
||||
# Sniffer Zigbee
|
||||
<pyet>/zigbee/python_zigbee_interface.py -c <channel>
|
||||
|
||||
$ pyet: echo "$HOME/Netatmo/core/python-emb-tools/python/bin"
|
4
navi/nextcloud.cheat
Normal file
4
navi/nextcloud.cheat
Normal file
@ -0,0 +1,4 @@
|
||||
% nextcloud
|
||||
|
||||
# Execute occ command
|
||||
sudo -u nextcloud php /var/www/nextcloud/occ <command>
|
10
navi/nginx.cheat
Normal file
10
navi/nginx.cheat
Normal file
@ -0,0 +1,10 @@
|
||||
% nginx
|
||||
|
||||
# Enable site
|
||||
sudo ln -s /etc/nginx/sites-available/<ls_site> /etc/nginx/sites-enabled/<ls_site>
|
||||
|
||||
# Disable site
|
||||
sudo 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}'
|
28
navi/syncapi.cheat
Normal file
28
navi/syncapi.cheat
Normal file
@ -0,0 +1,28 @@
|
||||
% syncapi
|
||||
|
||||
# SyncAPI Muller
|
||||
<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> -c <syncapi_path>/legrand_<server>.swp --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>
|
||||
|
||||
# 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"
|
||||
$ endpoint: echo "getstatus getconfigs setstate setconfigs getdebuginfo getoeminfo" | tr " " "\n"
|
37
navi/systemctl.cheat
Normal file
37
navi/systemctl.cheat
Normal file
@ -0,0 +1,37 @@
|
||||
% systemctl
|
||||
|
||||
# Start service
|
||||
sudo systemctl start <service_inactive>
|
||||
|
||||
# Stop service
|
||||
sudo systemctl stop <service_active>
|
||||
|
||||
# Enable service
|
||||
sudo systemctl enable <service_disabled>
|
||||
|
||||
# Disable service
|
||||
sudo systemctl disable <service_enabled>
|
||||
|
||||
# Restart service
|
||||
sudo systemctl restart <service>
|
||||
|
||||
# Reload service
|
||||
sudo systemctl reload <service_active>
|
||||
|
||||
# Service status
|
||||
sudo systemctl status <service>
|
||||
|
||||
# List running services
|
||||
sudo systemctl list-units --type=service --state=running
|
||||
|
||||
# List enabled services
|
||||
sudo systemctl list-unit-files --type=service --state=enabled
|
||||
|
||||
# List disabled services
|
||||
sudo systemctl list-unit-files --type=service --state=disabled
|
||||
|
||||
$ service_inactive: systemctl list-units --type=service --state=inactive | awk '{print $1}' | grep .service | sed 's/.service$//'
|
||||
$ service_active: systemctl list-units --type=service --state=active | awk '{print $1}' | grep .service | sed 's/.service$//'
|
||||
$ service_enabled: systemctl list-unit-files --type=service --state=enabled | awk '{print $1}' | grep .service | sed 's/.service$//'
|
||||
$ service_disabled: systemctl list-unit-files --type=service --state=disabled | awk '{print $1}' | grep .service | sed 's/.service$//'
|
||||
$ service: systemctl list-units --type=service --all | awk '{print $1}' | grep .service | sed 's/.service$//'
|
30
terminator/config
Normal file
30
terminator/config
Normal file
@ -0,0 +1,30 @@
|
||||
[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
|
||||
palette = "#000000:#aa0000:#00aa00:#f57900:#55ffff:#ff006e:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#55ffff:#ff006e:#00aaaa:#ffffff"
|
||||
use_system_font = False
|
||||
split_to_group = True
|
||||
[layouts]
|
||||
[[default]]
|
||||
[[[window0]]]
|
||||
type = Window
|
||||
parent = ""
|
||||
[[[child1]]]
|
||||
type = Terminal
|
||||
parent = window0
|
||||
[plugins]
|
@ -43,3 +43,13 @@ else
|
||||
ZSH_THEME_GIT_PROMPT_REBASE="%{$fg_bold[magenta]%}|REBASE%{${reset_color}%} "
|
||||
ZSH_THEME_GIT_PROMPT_BISECT="%{$fg_bold[magenta]%}|BISECT%{${reset_color}%} "
|
||||
fi
|
||||
|
||||
function theme_preexec {
|
||||
print -nr $'\e]2;'"$USER@$(hostname) » $PWD » $1 $2"$'\a'
|
||||
}
|
||||
add-zsh-hook preexec theme_preexec
|
||||
|
||||
function theme_precmd {
|
||||
print -nr $'\e]2;'"$USER@$(hostname) » $PWD"$'\a'
|
||||
}
|
||||
add-zsh-hook precmd theme_precmd
|
||||
|
Loading…
x
Reference in New Issue
Block a user