Compare commits

..

9 Commits

Author SHA1 Message Date
Robin-Charles Guihéneuf 66015c7762 misc: Use ripgrep instead of ack 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf 1d947a4c9a misc: Install cargo from source 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf 1beccf1252 navi: Fix git clean command 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf 1333250def navi: Add git patch cheat sheets 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf fff6f346cb navi: Add docker image commands 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf 553b019911 navi: Improve compression commands 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf 89d164c957 navi: Rework replace commands 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf 521541490d navi: Add docker commands 2026-04-27 13:55:26 +02:00
Robin-Charles Guihéneuf bfcf494bba navi: Add docker compose commands 2026-04-27 13:55:26 +02:00
4 changed files with 55 additions and 14 deletions
+2 -1
View File
@@ -19,7 +19,7 @@ install_git_repo () {
# Install packages # Install packages
sudo apt update sudo apt update
sudo apt upgrade sudo apt upgrade
sudo apt install minicom ssh git tig ack tree npm cargo python3-pip curl zsh sudo apt install minicom ssh git tig ripgrep tree npm python3-pip curl zsh
# Install Oh my ZSH # Install Oh my ZSH
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@@ -57,6 +57,7 @@ install_git_repo https://github.com/junegunn/fzf.git $HOME/.fzf
$HOME/.fzf/install $HOME/.fzf/install
# Install navi # Install navi
curl https://sh.rustup.rs -sSf | sh
cargo install navi cargo install navi
mkdir -p $HOME/.local/share/navi/cheats mkdir -p $HOME/.local/share/navi/cheats
ln -sfn $HOME/.dotfiles/navi/ $HOME/.local/share/navi/cheats/vulporuza ln -sfn $HOME/.dotfiles/navi/ $HOME/.local/share/navi/cheats/vulporuza
+1 -1
View File
@@ -27,7 +27,7 @@ sudo docker compose -f <file> logs --tail 100 <service>
# Print and follow logs of a compose YAML # Print and follow logs of a compose YAML
sudo docker compose -f <file> logs --tail 100 -f sudo docker compose -f <file> logs --tail 100 -f
# Print and follow logs of a compose YAML # Print and follow service logs of a compose YAML
sudo docker compose -f <file> logs --tail 100 -f <service> sudo docker compose -f <file> logs --tail 100 -f <service>
# Remove volume of a compose YAML # Remove volume of a compose YAML
+25 -10
View File
@@ -3,24 +3,24 @@
# Create a volume # Create a volume
sudo docker volume create <name> sudo docker volume create <name>
# Remove a volume
sudo docker volume rm <volume>
# List all volumes # List all volumes
sudo docker volume ls sudo docker volume ls
# Remove volume $ volume: sudo docker volume ls --format "{{.Name}}" | sort | awk '{print $1}'
sudo docker volume rm <volume>
$ volume: sudo docker volume ls --format "{{.Name}}" | awk '{print $1}'
# Create new network # Create new network
docker network create <name> sudo docker network create <name>
# List all networks
sudo docker network ls
# Remove network # Remove network
sudo docker network rm <network> sudo docker network rm <network>
$ network: sudo docker network ls --format "{{.Name}}" | awk '{print $1}' # List all networks
sudo docker network ls
$ network: sudo docker network ls --format "{{.Name}}" | sort | awk '{print $1}'
# List the running containers # List the running containers
sudo docker ps sudo docker ps
@@ -43,4 +43,19 @@ sudo docker logs --tail 100 <container>
# 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
$ container: sudo docker container ls --format "{{.Names}}" | awk '{print $1}' $ 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}'
+27 -2
View File
@@ -38,8 +38,8 @@ git push --set-upstream <remote_name> <branch_name>
# Displays formatted log of commits for a repo # Displays formatted log of commits for a repo
git log --all --decorate --oneline --graph git log --all --decorate --oneline --graph
# Clear everything # Clean everything
git clean -dxf git clean -fdx
# Add a new module # Add a new module
git submodule add <repository> <path> git submodule add <repository> <path>
@@ -67,5 +67,30 @@ git push origin <name>
git tag -d <tag_name> git tag -d <tag_name>
git push -d origin <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 # Variables
$ tag_name: git tag -l | awk '{print $1}' $ 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}'