-
Install the the
shadowsocks-libev
package from apt repository.sudo apt update sudo apt install shadowsocks-libev
-
Save
ss.json
as/etc/shadowsocks-libev/config.json
.
This file contains 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 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 file contains 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 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
This file contains 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
def coroutine(text): | |
while True: | |
input_search = (yield) | |
if input_search in text: | |
print 'contained' | |
else: | |
print('no') |
This file contains 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 | |
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" |
This file contains 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: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: |
This file contains 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: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro |
This file contains 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
grant all privileges on *.* to 'root'@'%' identified by 'xuyuji'; | |
flush privileges; |
This file contains 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 | |
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 |
NewerOlder