Increase docker container shell columns link
docker exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" -ti container bash
Remove all stoped containers:
docker container prune
/etc/default/docker
DOCKER_OPTS="--dns 1.1.1.1 --dns 8.8.4.4 -H 0.0.0.0:2375 -H unix:///var/run/docker.sock"
/lib/systemd/system/docker.service
EnvironmentFile=/etc/default/docker
ExecStart=/usr/bin/dockerd $DOCKER_OPTS
sudo systemctl daemon-reload && sudo systemctl restart docker.service
# https://docs.docker.com/engine/reference/commandline/build/#git-repositories
# #branch(default: master):directory of Dockerfile
docker build -t apachepulsar/pulsar-dashboard https://github.com/apache/pulsar.git#master:dashboard
https://github.com/wagoodman/dive
After running pip3 install -U pip
the pip breaks with the following error:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
To solve this problem execute:
RUN bash -c "hash -d pip3"
You can found more details about the problem and the solution here.
When the system is very slow or not responding use the following key combinations:
# Wait 1 second between each letter key press
# Maintain the CTRL + ALT + SysRQ pressed
CTRL + ALT + SysRQ r e i s u b
Find all hosts online on network:
sudo arp-scan --interface=eth0 --localnet
Monitoring files and running command. In this example I will run the python unittest.
while inotifywait -e close_write -r .; do python -m unittest discover; done
git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
# edit .zshrc to load zgen
source "${HOME}/.zgen/zgen.zsh"
Arch
sudo pacman -Sy noto-fonts-emoji
Ubuntu
Remove remote tag
git push --delete origin tagname
Remove local tag
git tag --delete tagname
Create commit message template
git config --global commit.template ~/.gitmessage
echo > ~/.gitmessage << EOF
# [Add/Fix/Remove/Update/Refactor/Document] [summary]
# Why is it necessary? (Bug fix, feature, improvements?)
-
# How does the change address the issue?
-
# What side effects does this change have?
-
# Include a link to the ticket, if any.
EOF
Partial stage new file
git add -N <file>
git add -p <file>
Remove a package and all dependencies.
pacman -Runs gnome
dconf write /org/gnome/desktop/input-sources/xkb-options "['grp_led:scroll']"
sudo apt-get install build-essential libbz2-dev libsqlite3-dev libreadline-dev \
libssl-dev libffi-dev libc6-dev zlib1g-dev automake autoconf libncurses5-dev \
unixodbc-dev libwxgtk3.0-dev libxslt1-dev xsltproc fop libxml2-utils
systemctl status snap.docker.dockerd.service
Redirect local service calling
- socat TCP4-LISTEN:80,fork TCP4:www.yourdomain.org:8080
rsync -avzh /my/origin/dir /my/dest/dir
rsync -avzhe ssh --progress /my/origin/dir <USER>@<HOST>:/my/dest/dir