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
<figure class="swipe"><iframe src="https://www.swipe.to/embed/4164m" allowfullscreen></iframe></figure><style>figure.swipe{display:block;position:relative;padding-bottom:56.25%;height:0;overflow:hidden;}figure.swipe iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none;}</style> |
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
# Install Docker on Ubuntu 14.04.4 x64 | |
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# No interactive for now. | |
export DEBIAN_FRONTEND=noninteractive | |
# Update your APT package index. | |
sudo apt-get -y update | |
# Update package information, ensure that APT works with the https method, and that CA certificates are installed. | |
sudo apt-get -y install apt-transport-https ca-certificates | |
# Add the new GPG key. | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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
<h3 style="text-align: center;" markdown="1">Quick Menu</h3> | |
<p style="text-align: center;" markdown="1"> | |
<a href="/services//"><i class="fa fa-briefcase" aria-hidden="true"></i></a> <a href="/services/">Services</a> <a href="/contact/"><i class="fa fa-envelope" aria-hidden="true"></i></a> <a href="/contact/">Contact Me</a> <a href="/"><i class="fa fa-home"" aria-hidden="true"></i></a> <a href="/">Go Home</a><br><br> | |
</p> |
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
# List all databases | |
sudo -u postgres psql --list | |
# Create backup file | |
sudo -u postgres pg_dump [database_name] > dumpl.sql | |
# Drop the database | |
sudo -u prostgres dropdb [database_name] | |
# Create a new database |
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
#!/bin/bash | |
# Shell script to backup MySql database | |
# CONFIG - Only edit the below lines to setup the script | |
# =============================== | |
MyUSER="root" # USERNAME | |
MyPASS="password" # PASSWORD | |
MyHOST="localhost" # Hostname |
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
Basic CMD | |
$ docker run -d alpine top | |
Loop CMD | |
for I in {1..100} ; do | |
docker run -d alpine top | |
echo "loop $I" | |
done |
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
#!/bin/sh | |
# option 2: paste this into user-data to automate install via boot script | |
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
mkdir -p /etc/apt/sources.list.d | |
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list | |
printf 'net.ipv4.neigh.default.gc_thresh1 = 30000\nnet.ipv4.neigh.default.gc_thresh2 = 32000\nnet.ipv4.neigh.default.gc_thresh3 = 32768' >> /etc/sysctl.conf | |
sysctl -p |
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
#!/bin/sh | |
# option 2: paste this into user-data to automate install via boot script | |
apt-get update -y && apt-get -y dist-upgrade | |
service lxcfs stop | |
apt-get remove -y -q lxc-common lxcfs lxd lxd-client | |
apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual | |
echo "net.ipv4.neigh.default.gc_thresh1 = 30000\nnet.ipv4.neigh.default.gc_thresh2 = 32000\nnet.ipv4.neigh.default.gc_thresh3 = 32768" >> /etc/sysctl.conf | |
curl -fsSL https://get.docker.com/ | sh | |
docker swarm join \ |
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
#!/bin/sh | |
# option 2: paste this into user-data to automate install via boot script | |
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
mkdir -p /etc/apt/sources.list.d | |
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list | |
printf 'net.ipv4.neigh.default.gc_thresh1 = 30000\nnet.ipv4.neigh.default.gc_thresh2 = 32000\nnet.ipv4.neigh.default.gc_thresh3 = 32768' >> /etc/sysctl.conf | |
sysctl -p |
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
#!/bin/bash | |
for II in `seq 1 20`; | |
do | |
docker-machine create -d digitalocean --digitalocean-access-token $DO --digitalocean-size 1gb name-$II | |
docker-machine ssh name-$II "echo net.ipv4.neigh.default.gc_thresh1 = 30000 >> /etc/sysctl.conf ;" | |
docker-machine ssh name-$II "echo net.ipv4.neigh.default.gc_thresh2 = 32000 >> /etc/sysctl.conf ;" | |
docker-machine ssh name-$II "echo net.ipv4.neigh.default.gc_thresh3 = 32768 >> /etc/sysctl.conf ;" | |
docker-machine ssh name-$II "sysctl -p;" | |
docker-machine ssh name-$II "docker swarm join --advertise-addr $(docker-machine ip name-$II) --token SWMTKN-1-29tx6z2k8zmsbt9z2c2ay54jc9ce2l94ixhmmagveifv3pp4fa-5e8i9gugpb9b4bmi9vrp7m5su 67.205.160.45:2377" |