mandatory.yml
, do not use hostNetwork,# hostNetwork: true
cloud-generic.yml
, addexternalIPs
kind: Service apiVersion: v1 metadata: name: ingress-nginx namespace: ingress-nginx labels:
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 -ex | |
yum install -y git gcc gcc-c++ | |
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel | |
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \ | |
openssl-devel xz xz-devel libffi-devel | |
# curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash |
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 -ex | |
sleep_time=5 | |
regex_name='server1.py' | |
cmd="python ${regex_name} &>> logs/test.log &" | |
bash -c "${cmd}" |
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 -ex | |
if [[ "$1" =~ ^[0-9]+$ ]]; then | |
echo "yes" | |
else | |
echo "no" | |
fi |
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 -ex | |
containers=$(docker ps -a -q --filter status=exited) | |
if [[ ! -z ${containers} ]]; then | |
docker rm -f -v ${containers} | |
fi |
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
mysql+pymysql://root:xxxx@localhost:3306/qin?charset=utf8 |
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
[Unit] | |
Description=containerd container runtime | |
Documentation=https://containerd.io | |
After=network.target | |
[Service] | |
ExecStartPre=/sbin/modprobe overlay | |
ExecStart=/usr/bin/docker-containerd | |
KillMode=process | |
Delegate=yes |
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
# COPY FROM https://stackoverflow.com/questions/32658679/how-to-create-a-mysql-connection-pool-or-any-better-way-to-initialize-the-multip | |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import time | |
import mysql.connector.pooling | |
dbconfig = { | |
"host":"127.0.0.1", |
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
a = [('a', 'etwrfb', 'casdf'), ('1', 2, '35235')] | |
res = '\n'.join(','.join(map(str, i)) for i in a) | |
# 'a,etwrfb,casdf\n1,2,35235' |
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
CREATE TABLE if not exists `test` ( | |
`id` BIGINT(20) NOT NULL AUTO_INCREMENT, | |
`result` VARCHAR(128), | |
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
KEY id (id)) | |
ENGINE=InnoDB DEFAULT CHARSET=UTF8 AUTO_INCREMENT=1 | |
PARTITION BY RANGE ( TO_DAYS(update_time) ) ( | |
-- PARTITION BY hash (TO_DAYS(update_time)) partitions 31; | |
PARTITION p_first VALUES LESS THAN (TO_DAYS('2019-01-07 00:00:00')), | |
PARTITION p20190107 VALUES LESS THAN (TO_DAYS('2019-01-08 00:00:00')), |