Compare commits
No commits in common. "a9c637bf9ac695fb7c5be30e5f8fdc7d7b1db5f5" and "24e9117c04b824571fd0a90681bf55354db7dae7" have entirely different histories.
a9c637bf9a
...
24e9117c04
@ -73,10 +73,3 @@ sudo npm install -g npm
|
|||||||
# Install rebase-editor
|
# Install rebase-editor
|
||||||
sudo npm install -g rebase-editor
|
sudo npm install -g rebase-editor
|
||||||
git config --global sequence.editor 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
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"Alt-/": "lua:comment.comment",
|
|
||||||
"CtrlUnderscore": "lua:comment.comment"
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
{}
|
|
@ -1,10 +0,0 @@
|
|||||||
% docker-compose
|
|
||||||
|
|
||||||
# Builds, (re)creates, starts, and attaches to containers for all services
|
|
||||||
sudo docker-compose up
|
|
||||||
|
|
||||||
# Builds, (re)creates, starts, and dettaches to containers for all services
|
|
||||||
sudo docker-compose up -d
|
|
||||||
|
|
||||||
# Stops containers and removes containers, networks created by up
|
|
||||||
sudo docker-compose down
|
|
@ -1,60 +0,0 @@
|
|||||||
% docker
|
|
||||||
|
|
||||||
# Remove an image
|
|
||||||
docker image rm <image_id>
|
|
||||||
|
|
||||||
# Remove an image from the local image store
|
|
||||||
docker rmi <image_id>
|
|
||||||
|
|
||||||
# Remove all images from the local image store
|
|
||||||
docker rmi $(docker images -q) --force
|
|
||||||
|
|
||||||
# Remove all containers
|
|
||||||
docker rm $(docker ps -aq)
|
|
||||||
|
|
||||||
# Stop all containers
|
|
||||||
docker stop $(docker ps -aq)
|
|
||||||
|
|
||||||
# List all images that are locally stored with the Docker engine
|
|
||||||
docker images
|
|
||||||
|
|
||||||
# Build an image from the Dockerfile in the current directory and tag the image
|
|
||||||
docker build -t <image>:<version> .
|
|
||||||
|
|
||||||
# Pull an image from a registry
|
|
||||||
docker pull <image>:<version>
|
|
||||||
|
|
||||||
# Stop a running container through SIGTERM
|
|
||||||
docker stop <container_id>
|
|
||||||
|
|
||||||
# Stop a running container through SIGKILL
|
|
||||||
docker kill <container_id>
|
|
||||||
|
|
||||||
# List the networks
|
|
||||||
docker network ls
|
|
||||||
|
|
||||||
# List the running containers
|
|
||||||
docker ps
|
|
||||||
|
|
||||||
# Delete all running and stopped containers
|
|
||||||
docker rm -f "$(docker ps -aq)"
|
|
||||||
|
|
||||||
# Create a new bash process inside the container and connect it to the terminal
|
|
||||||
docker exec -it <container_id> bash
|
|
||||||
|
|
||||||
# Print the last lines of a container's logs
|
|
||||||
docker logs --tail 100 <container_id> | less
|
|
||||||
|
|
||||||
# Print the last lines of a container's logs and following its logs
|
|
||||||
docker logs --tail 100 <container_id> -f
|
|
||||||
|
|
||||||
# Create new network
|
|
||||||
docker network create <network_name>
|
|
||||||
|
|
||||||
$ image_id: docker images --- --headers 1 --column 3 --delimiter '\s\s+'
|
|
||||||
$ container_id: docker ps --- --headers 1 --column 1 --delimiter '\s\s+'
|
|
||||||
|
|
||||||
% docker, boot
|
|
||||||
|
|
||||||
# Prevent all containers from autostarting on boot
|
|
||||||
docker update --restart=no $(docker ps -a -q)
|
|
@ -1,60 +0,0 @@
|
|||||||
% 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>
|
|
@ -1,10 +0,0 @@
|
|||||||
% mysql
|
|
||||||
|
|
||||||
# Create database
|
|
||||||
mysql -u <user> -p -e "create database <database> character set UTF8mb4 collate utf8mb4_bin"
|
|
||||||
|
|
||||||
# Export databse
|
|
||||||
mysqldump -u <user> -p <database> > <path>
|
|
||||||
|
|
||||||
# Import database
|
|
||||||
mysql -u <user> -p <database> <path>
|
|
Loading…
x
Reference in New Issue
Block a user