This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --hostname mf_rabbit --name mf_rabbit -p 5672:5672 -p 15672:15672 rabbitmq:3.7.15 | |
rabbitmq-plugins enable rabbitmq_management | |
rabbitmqctl add_user your_user your_password | |
rabbitmqctl set_user_tags your_user administrator | |
rabbitmqctl set_permissions -p / your_user ".*" ".*" ".*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING! VF can be installed in both python3 or python2.7 you should check that versions of python match in both commands (pip install and coammand in config.fish) | |
sudo pip3 install virtualfish | |
echo "eval (python3 -m virtualfish)" >> ~/.config/fish/config.fish | |
Copy output of "funced -e nano fish_prompt" | |
Paste to "nano ~/.config/fish/functions/fish_prompt.fish" | |
or just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker - How to cleanup (unused) resources | |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ... | |
## delete volumes | |
// see: https://github.com/chadoe/docker-cleanup-volumes | |
$ docker volume rm $(docker volume ls -qf dangling=true) | |
$ docker volume ls -qf dangling=true | xargs -r docker volume rm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Make sure you're stopped the main daemon: sudo systemctl stop docker ; systemctl status docker | |
2) Create your new storage directory: sudo mkdir /storage | |
3) Move existing content to that diractory: sudo mv /var/lib/docker /storage | |
4) Configure daemon to use new directory: sudo nano /etc/docker/daemon.json | |
{ | |
"data-root": "/storage/docker" | |
} | |
5) Start main daemon again: sudo systemctl start docker ; systemctl status docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set OVPN_DATA "ovpn-data-dir" | |
docker volume create --name $OVPN_DATA | |
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_genconfig -u udp://xl.novk.ga | |
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn ovpn_initpki | |
docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn | |
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa build-client-full root nopass | |
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_getclient root > root.ovpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Dockerfile for delegated | |
# | |
FROM debian | |
MAINTAINER kev <[email protected]> | |
ENV DG_VERSION 9_9_13 | |
ENV DG_FILE linux2.6-dg${DG_VERSION}.tar.gz | |
ENV DG_DIR dg${DG_VERSION} | |
ENV DG_URL http://delegate.hpcc.jp/anonftp/DeleGate/bin/linux/latest/${DG_FILE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Filter Delegated log at /usr/share/delegated/log/53120 | |
[Init] | |
maxlines = 50 | |
[Definition] | |
datepattern = %%m/%%d %%H:%%M:%%S | |
failregex = .*?E-P: No permission: <HOST>.*?\(SocksV4 is not acceptable\) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will temporairly create /var/novk/ssl/.well-known/xxxxxx confirmation file and trigger | |
# external check of it's availiblty and contents from letsencrypt's authority servers. | |
# This directory simply should be served by some http server when container launches | |
# This container isn't designed to be persistent and it will exit and removed once command will finish. | |
# You may simply add it into your crontab | |
docker run -it --rm --name certbot \ | |
-v /var/novk/ssl:/var/novk/ssl \ | |
-v /etc/letsencrypt:/etc/letsencrypt \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqlcheck -h 127.0.0.1 -u root -p -r YOUR_DB_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TABLE_NAME, | |
ENGINE | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = 'YOUR DB NAME'; |