Stack Overflow - Why does Python print unicode characters when the default encoding is ASCII?
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 | |
set -euo pipefail | |
# tmux 会话名字 | |
sessionName=mc | |
# 服务器关闭警告信息 | |
stopDelay=10 | |
stopWarn=服务器将在${stopDelay}秒后关闭进行备份 | |
# 存档位置 |
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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 5.14.2-gentoo Kernel Configuration | |
# | |
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 11.2.0 p1) 11.2.0" | |
CONFIG_CC_IS_GCC=y | |
CONFIG_GCC_VERSION=110200 | |
CONFIG_CLANG_VERSION=0 | |
CONFIG_AS_IS_GNU=y | |
CONFIG_AS_VERSION=23700 |
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
docker network create etcd --subnet 172.19.0.0/16 | |
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \ | |
-name etcd0 \ | |
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \ | |
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ | |
-initial-advertise-peer-urls http://172.19.1.10:2380 \ | |
-listen-peer-urls http://0.0.0.0:2380 \ | |
-initial-cluster-token etcd-cluster-1 \ | |
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \ |
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 | |
## | |
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET > client.ovpn | |
## | |
server=${1?"The server address is required"} | |
cacert=${2?"The path to the ca certificate file is required"} | |
client_cert=${3?"The path to the client certificate file is required"} | |
client_key=${4?"The path to the client private key file is required"} |
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
client | |
dev tun | |
remote example.com | |
resolv-retry infinite | |
nobind | |
persist-key | |
persist-tun | |
ca [inline] | |
cert [inline] | |
key [inline] |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
#!/usr/ali/bin/python | |
# coding=utf-8 | |
'''Implements a simple database interface | |
Example 0: Create connection: | |
# Set auto commit to false | |
db = DB(False, host = 'x', user = 'x', passwd = 'x', db = 'x') |
NewerOlder