Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b98a84c13 | |||
| 91de63434f | |||
| 848ff0af5f | |||
| fe95d770b9 |
+1
-2
@@ -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 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
|
# 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,7 +57,6 @@ 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
|
||||||
|
|||||||
@@ -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 service logs of a compose YAML
|
# Print and follow 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
|
||||||
|
|||||||
+10
-25
@@ -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
|
||||||
|
|
||||||
$ 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
|
# Create new network
|
||||||
sudo docker network create <name>
|
docker network create <name>
|
||||||
|
|
||||||
# Remove network
|
|
||||||
sudo docker network rm <network>
|
|
||||||
|
|
||||||
# List all networks
|
# List all networks
|
||||||
sudo docker network ls
|
sudo docker network ls
|
||||||
|
|
||||||
$ network: sudo docker network ls --format "{{.Name}}" | sort | awk '{print $1}'
|
# Remove network
|
||||||
|
sudo docker network rm <network>
|
||||||
|
|
||||||
|
$ network: sudo docker network ls --format "{{.Name}}" | awk '{print $1}'
|
||||||
|
|
||||||
# List the running containers
|
# List the running containers
|
||||||
sudo docker ps
|
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
|
# 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}}" | sort | awk '{print $1}'
|
$ container: sudo docker container ls --format "{{.Names}}" | 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}'
|
|
||||||
|
|||||||
+2
-27
@@ -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
|
||||||
|
|
||||||
# Clean everything
|
# Clear everything
|
||||||
git clean -fdx
|
git clean -dxf
|
||||||
|
|
||||||
# Add a new module
|
# Add a new module
|
||||||
git submodule add <repository> <path>
|
git submodule add <repository> <path>
|
||||||
@@ -67,30 +67,5 @@ 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}'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user