Compare commits

..

44 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
vulporuza f6d786cf37 navi: Update docker-compose sheet 2022-11-18 17:12:39 +01:00
vulporuza f07885a997 navi: Update docker sheet 2022-11-18 17:12:39 +01:00
vulporuza 7146741005 navi: Update misc sheet 2022-11-18 17:12:39 +01:00
vulporuza 641175e365 navi: Update compression sheet 2022-11-18 17:12:39 +01:00
vulporuza f024379c64 codium: Remove useless keybinding 2022-11-18 17:12:39 +01:00
vulporuza f4a48d7f8a codium: Export Android SDK environment viariables 2022-11-18 17:12:39 +01:00
vulporuza 1e9efe1d56 aliases: Use code as default 2022-11-18 17:12:39 +01:00
vulporuza a68dcaf784 aliases: Remove personal zephyr includes 2022-11-18 17:12:39 +01:00
vulporuza 8fa9a66ef3 codium: Update configuration 2022-11-18 17:12:39 +01:00
vulporuza f3141f85c0 navi: Add reinstall cheat 2022-11-18 17:12:39 +01:00
vulporuza 6614722246 aliases: Add NPC helpers 2022-11-18 17:12:39 +01:00
vulporuza 73473b3c05 navi: Add helpers (compare & bluetooth) 2022-11-18 17:12:39 +01:00
vulporuza 759792da66 aliases: Add NAS project 2022-11-18 17:12:39 +01:00
vulporuza fdcc2bd369 codium: Add lower case keybinding 2022-11-18 17:12:39 +01:00
vulporuza 17a3a6a147 config: Add font installation in GUI 2022-11-18 17:12:39 +01:00
vulporuza 77ad52f31d codium: Misc configuration 2022-11-18 17:12:39 +01:00
vulporuza fb4feef7aa terminator: Change font 2022-11-18 17:12:39 +01:00
vulporuza 3012e354cd navi: Add meld cheat sheet 2022-11-18 17:12:39 +01:00
vulporuza 38ae30a5cd codium: Change editor font 2022-11-18 17:12:39 +01:00
vulporuza d31e0651cb navi: Add nextcloud sheet 2022-11-18 17:12:39 +01:00
vulporuza 01bf1a804d navi: Add some IP helpers 2022-11-18 17:12:39 +01:00
vulporuza 4c1700b2c4 navi: Add git tag helpers 2022-11-18 17:12:39 +01:00
vulporuza 4f2093042a navi: Add freqtrade cheat sheet 2022-11-18 17:12:39 +01:00
vulporuza fc7dc0c9e2 aliases: Add micro alias 2022-11-18 17:12:39 +01:00
vulporuza 18fb933a84 navi: Add some cheat sheets 2022-11-18 17:12:39 +01:00
vulporuza b107998b5b install: Add micro editor install 2022-11-18 17:12:39 +01:00
vulporuza 71876b6afb alias: Add git profile switch aliases 2022-11-18 17:12:39 +01:00
vulporuza 95f4bfb6db navi: Add nginx cheat sheet 2022-11-18 17:12:39 +01:00
vulporuza ebed5ccb2f navi: Add syncapi debug cheatsheets 2022-11-18 17:12:39 +01:00
vulporuza bbd04fd66a aliases: Introduce git_parent and associated rebase aliases 2022-11-18 17:12:39 +01:00
vulporuza 7a5c3a66e2 aliases: General cleanup 2022-11-18 17:12:39 +01:00
vulporuza bf2ea53cf9 zsh: Add completion for Makefile implicit targets 2022-11-18 17:12:39 +01:00
vulporuza df69aface3 zsh: Add preexec & precmd hook to vulporuza theme 2022-11-18 17:12:39 +01:00
vulporuza 8df85821b4 aliases: Add Netatmo path to PATH variable 2022-11-18 17:12:39 +01:00
vulporuza 1faa2204dc aliases: Add git amend alias to amend commits automatically 2022-11-18 17:12:39 +01:00
vulporuza d724ee2a58 terminator: Include configuration file 2022-11-18 17:12:39 +01:00
vulporuza d96c2c4f99 codium: Migration from Nextcloud 2022-11-18 17:12:39 +01:00
vulporuza 60a35066df navi: Migration from Nextcloud 2022-11-18 17:12:39 +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 83 additions and 168 deletions
+30 -6
View File
@@ -243,18 +243,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 +285,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,9 +332,18 @@ 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
+7 -2
View File
@@ -19,7 +19,7 @@ install_git_repo () {
# Install packages
sudo apt update
sudo apt upgrade
sudo apt install minicom ssh git tig ripgrep tree npm python3-pip curl zsh
sudo apt install minicom ssh git tig ack tree npm cargo python3-pip curl zsh
# Install Oh my ZSH
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@@ -57,11 +57,16 @@ install_git_repo https://github.com/junegunn/fzf.git $HOME/.fzf
$HOME/.fzf/install
# Install navi
curl https://sh.rustup.rs -sSf | sh
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": [
+6 -25
View File
@@ -1,34 +1,16 @@
% compression
# Create a tar archive
tar -cvf <name>.tar <files>
# Create a tar archive (gz compression)
tar -cvzf <name>.tar.gz <files>
# Create a tar archive (pigz compression)
tar -I pigz -cvf <name>.tar.gz <files>
# Create a tar archive (bzip2 compression)
tar -cvjf <name>.tar.bz2 <files>
# Create a tar archive (pbzip2 compression)
tar -I pbzip2 -cvf <name>.tar.bz2 <files>
tar cf <name>.tar <files>
# Extract a tar archive
tar -xf <tar_file>
tar xf <tar_file>
# Extract a tar (gz compression)
tar -xzf <targz_file>
# Create a tar archive with gz compression
tar czf <name>.tar.gz <files>
# Extract a tar (pigz compression)
tar -I pigz -xf <targz_file>
# Extract a tar (bzip2 compression)
tar -xjf <tarbz2_file>
# Extract a tar (pbzip2 compression)
tar -I pbzip2 -xf <tarbz2_file>
# Extract a tar using gz compression
tar xzf <targz_file>
# Create a gz archive
gzip -9 -c <files> > <name>.gz
@@ -39,5 +21,4 @@ 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}'
$ tarbz2_file: ls *.tar.bz2 | awk -F: '{ print $1}'
$ gz_file: ls *.gz | awk -F: '{ print $1}'
+9 -27
View File
@@ -1,39 +1,21 @@
% docker-compose
# Build a compose YAML
sudo docker compose -f <file> build
# 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
# Up and daemonze a compose YAML
sudo docker-compose -f <file> down
# Execute command in a compose YAML
sudo docker compose -f <file> exec <service> <command>
# Print the last lines of compose YAML logs
sudo docker-compose -f <file> logs --tail 100
# Print logs of a compose YAML
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
# Print service logs of a compose YAML
sudo docker compose -f <file> logs --tail 100 <service>
# Print and follow logs of a compose YAML
sudo docker compose -f <file> logs --tail 100 -f
# Print and follow service logs of a compose YAML
sudo docker compose -f <file> logs --tail 100 -f <service>
# Remove volume of a compose YAML
sudo docker volume rm <dir>_<volume>
$ dir: basename $PWD
$ file: ls *.yaml | awk '{print $1}'
$ volume: sudo docker compose -f <file> config --volumes | awk '{print $1}'
$ service: sudo docker compose -f <file> config --services | awk '{print $1}'
+11 -26
View File
@@ -3,24 +3,24 @@
# Create a volume
sudo docker volume create <name>
# Remove a volume
sudo docker volume rm <volume>
# List all volumes
sudo docker volume ls
$ volume: sudo docker volume ls --format "{{.Name}}" | sort | awk '{print $1}'
# Remove volume
sudo docker volume rm <volume>
$ volume: sudo docker volume ls --format "{{.Name}}" | awk '{print $1}'
# Create new network
sudo docker network create <name>
docker network create <name>
# Remove network
sudo docker network rm <network>
# List all networks
# List the networks
sudo docker network ls
$ network: sudo docker network ls --format "{{.Name}}" | sort | awk '{print $1}'
# Remove volume
sudo docker volume rm <network>
$ network: sudo docker network ls --format "{{.Name}}" | awk '{print $1}'
# List the running containers
sudo docker ps
@@ -43,19 +43,4 @@ 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
$ container: sudo docker container ls --format "{{.Names}}" | sort | awk '{print $1}'
# List all images
sudo docker image ls
# Remove an image
sudo docker image rm <image>
# Save an image into an archive
sudo docker image save <image> -o <name>
# Load an image from an archive
sudo docker image load -i <archive>
$ image: sudo docker image ls --format "{{.Repository}}:{{.Tag}}" | sort | awk '{print $1}'
$ archive: ls | awk '{print $1}'
$ container: sudo docker container ls --format "{{.Names}}" | awk '{print $1}'
+2 -27
View File
@@ -38,8 +38,8 @@ git push --set-upstream <remote_name> <branch_name>
# Displays formatted log of commits for a repo
git log --all --decorate --oneline --graph
# Clean everything
git clean -fdx
# Clear everything
git clean -dxf
# Add a new module
git submodule add <repository> <path>
@@ -67,30 +67,5 @@ git push origin <name>
git tag -d <tag_name>
git push -d origin <tag_name>
# Create a patch from current full diff
git diff > <patch_name>.patch
# Create a patch from current file diff
git diff <diff_file> > <patch_name>.patch
# Create a patch from commit(s)
git format-patch <first_commit>..<last_commit>
# Show a diff patch
git apply --stat <patch_name>
# Check a diff patch
git apply --check <patch_name>
# Apply a diff patch
git apply <patch_name>
# Apply a commit patch
git am <patch_name>
# Variables
$ tag_name: git tag -l | awk '{print $1}'
$ diff_file: git diff --name-only | awk '{print $1}'
$ first_commit: git log -n 20 --oneline | fzf --preview 'git show --color=always {1}' | awk '{print $1}'
$ last_commit: git log -n 20 --oneline | fzf --preview 'git show --color=always {1}' | awk '{print $1}'
$ patch_name: ls *.patch | awk '{print $1}'
-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}'
+2 -8
View File
@@ -54,18 +54,12 @@ meld <(hexdump -C <file_1>) <(hexdump -C <file_2>)
# Compare 2 files (bcompare)
bcompare <file_1> <file_2>
# Replace expression in files (ack)
ack -rl '<expression>' | xargs sed -i 's#<expression>#<replace_expression>#g'
# Replace expression in files (rg)
rg -l '<expression>' | xargs sed -i 's#<expression>#<replace_expression>#g'
# 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"
# Show disk usage
df -h
$ 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}'
+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