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
# bind to 0.0.0.0, block public | |
iptables -A INPUT -p tcp --dport 3306 -i eth0 -j DROP |
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
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/darwin/amd64/kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
kubectl version | |
# Latest provider | |
# Amazon EKS 1.14.7 | |
# GCP GKE 1.14.7 | |
minikube start --vm-driver=virtualbox --memory=8192 --kubernetes-version=1.14.7 |
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
version: '3.3' | |
services: | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:latest | |
volumes: | |
- wordpress_files:/var/www/html | |
ports: |
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
.^2a&ust*g'%+dTzRz^9&=T]q\<`vsQ6bdq]g9)Xm23"FL(u7VgV,pC`/Q8.q@\}p%e~;9")j(rxL9&w~w,88D:TRMJ_A{cFHs!f |
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
wget http://repo.mysql.com/mysql-apt-config_0.8.9-1_all.deb | |
dpkg -i mysql-apt-config_0.8.9-1_all.deb | |
apt-get install dirmngr --install-recommends | |
apt-key adv --keyserver keys.gnupg.net --recv-keys 8C718D3B5072E1F5 |
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
// URL | |
const reg = /^(http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/ |
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 ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
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 --rm -t -i -v $(pwd):/etc/gitlab-runner gitlab/gitlab-runner register | |
docker run -d --name jdsteam-gitlab-runner-01 --restart always \ | |
-v $(pwd):/etc/gitlab-runner \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
gitlab/gitlab-runner:latest |
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 a.name FROM employees a WHERE a.id NOT IN (SELECT b.managerId FROM employees b WHERE b.managerId IS NOT NULL); |
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 COUNT(*) FROM students WHERE firstName = 'John'; |