See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux
# This gist documents a list of examples of using `yt-dlp` command | |
# to download video assets from the YouTube platform | |
VIDEO_URL="https://www.youtube.com/watch?v=9tU3-WSyEhA" | |
# List available format | |
yt-dlp -F "${VIDEO_URL}" | |
# Download specific format |
# This shell file used for practice the learning from the following link: | |
# - https://blog.dnmfarrell.com/post/bash-function-names-can-be-almost-anything/ | |
function ++ { (( $1++ )); } | |
a=1 | |
++ a | |
echo $a |
See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux
def coroutine(text): | |
while True: | |
input_search = (yield) | |
if input_search in text: | |
print 'contained' | |
else: | |
print('no') |
#!/bin/sh | |
White='\033[1;36m' | |
NC='\033[0m' # No Color | |
case "$1" in | |
"test" ) | |
docker run --rm -it -v "$PWD":/app -w /app node:carbon-alpine /bin/sh -c "npm run test";; | |
* ) | |
echo "${White}test${NC}: run node test in docker" |
version: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: |
version: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro |
grant all privileges on *.* to 'root'@'%' identified by 'xuyuji'; | |
flush privileges; |
#!/bin/bash | |
apt update && apt install ebtables ethtool -y | |
apt update && apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
apt update && apt install -y kubelet kubeadm kubectl |
#!/bin/bash | |
# install docker | |
apt update | |
apt install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common -y |