Skip to content

Instantly share code, notes, and snippets.

Vlad Babii vladbabii

Block or report user

Report or block vladbabii

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vladbabii
vladbabii / run_this_to_map_anet_a8_to_dev_aneta8
Created Jun 29, 2018
Udev Rule To Map Anet A8 to /dev/aneta8
View run_this_to_map_anet_a8_to_dev_aneta8
echo "SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7523\", SYMLINK+=\"aneta8\", " > /etc/udev/rules.d/99-aneta8.rules
@vladbabii
vladbabii / myezbkp.sh
Created May 2, 2018 — forked from kriansa/myezbkp.sh
Easy MySQL incremental backups
View myezbkp.sh
#!/bin/sh
# ========================================================= #
# MyEzBkp
# Easy and simple backup of your entire MySQL Server.
#
# Ver: 1.0
# By: Kriansa
#
# This script requires root privileges to run!
# Tested only in RHEL based distros (Fedora & CentOS)
View howto-make-desktop-elements-smaller-ubuntu-17.txt
# apt-get install dconf-editor
$ dconf-editor
/org/gnome/desktop/interface/text-scaling-factor = 0.80
/org/gnome/nautilus/desktop/font/custom value = Ubuntu 10
$ gnome-control-center
Dock -> Icon size = 28
$ nautilus
@vladbabii
vladbabii / docker_haproxy_auto_config.php
Created Jan 30, 2018
Configure haproxy automatically for docker open ports
View docker_haproxy_auto_config.php
<?php
$list=@shell_exec('netstat -antepul | grep -i "listen" | grep "127.0.0.1:" | grep -i "docker-proxy"');
$list=explode("\n",str_replace("\r","",$list));
$ports=array();
foreach($list as $k=>$v){
$v=trim($v);
if(strlen($v)>0){
while(stripos($v,' ')!==false){
@vladbabii
vladbabii / mariadb_galera_cluster_check_restart.sh
Created Jan 30, 2018
MariaDB Galera 10.1+ Cluster Check and Restart
View mariadb_galera_cluster_check_restart.sh
STFAILED="failed"
STRUNNING="active"
STSTOPPED="stopped"
STSTARTING="starting"
CMDBOOTSTRAP="/usr/bin/galera_new_cluster"
CMDSTART="systemctl start mysql"
STARTWAIT=15
View disable_docker_auto_start.sh
bash -c 'echo manual | sudo tee /etc/init/docker.override'
@vladbabii
vladbabii / mount_x.service
Created Jan 29, 2018
Systemd run script after mount
View mount_x.service
# original: https://askubuntu.com/questions/25071/how-to-run-a-script-when-a-specific-flash-drive-is-mounted
# you can find your device unit with: sudo systemctl list-units -t mount
# put this into /etc/systemd/system/your.service
[Unit]
Description=SharedMountTrigger
Requires=mnt-shared.mount
After=mnt-shared.mount
[Service]
@vladbabii
vladbabii / rancher_load_balancer_timeout__haproxy_custom.txt
Created Jan 29, 2018
Rancher Load Balancer Timeout ( Haproxy Custom )
View rancher_load_balancer_timeout__haproxy_custom.txt
global
maxconn 4096
maxpipes 1024
defaults
timeout client 36000s
timeout server 36000s
@vladbabii
vladbabii / install_rancher_over_docker.sh
Created Jan 29, 2018
install_rancher_over_docker.sh
View install_rancher_over_docker.sh
mkdir -p /mnt/rancher_mysql
chmod -R 777 /mnt/rancher_mysql
docker run -d -v /mnt/rancher_mysql:/var/lib/mysql --restart=always -p 64080:8080 -p 9345:9345 rancher/server --advertise-address $RANCHERPUBLICIP --advertise-http-port 64080
@vladbabii
vladbabii / install_docker_latest_on_ubuntu_with_root_user.sh
Created Jan 29, 2018
install_docker_latest_on_ubuntu_with_root_user.sh
View install_docker_latest_on_ubuntu_with_root_user.sh
apt-get update
apt-get remove docker docker-engine docker.io
apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
-y
You can’t perform that action at this time.