RUN sed -i "s/archive.ubuntu./mirrors.aliyun./g" /etc/apt/sources.list
RUN sed -i "s/deb.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list
RUN sed -i "s/security.debian.org/mirrors.aliyun.com\/debian-security/g" /etc/apt/sources.list
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/bin/env bash | |
# | |
# Description: Auto test download & I/O speed script | |
# | |
# Copyright (C) 2015 - 2016 Teddysun <[email protected]> | |
# | |
# Thanks: LookBack <[email protected]> | |
# | |
# URL: https://teddysun.com/444.html | |
# |
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
{"sig":"e596ce75dbab35172f69d4cd81afc4e125e6fc99c1caed1a06ab89f8e423c653f047ab5e1418d4855a173d837533b081f0fcdebeeae9aefee544477f219346991","msghash":"5ab43d3b004173ff9919c233b46d92459b29e8ee3c796f0714e522947f57f751"} |
I hereby claim:
- I am zhkzyth on github.
- I am hugozen (https://keybase.io/hugozen) on keybase.
- I have a public key ASATrmpdJjqIGb28y1eaZpVwUkclIneXl87ZXcFDUJtCggo
To claim this, I am signing this object:
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 | |
# 初始化 | |
LOGS_PATH=/mnt/CodingMonkey/log | |
YESTERDAY=$(date -d "yesterday" +%Y%m%d) | |
mv -f ${LOGS_PATH}/api_access.log ${LOGS_PATH}/api_access_${YESTERDAY}.log 2>/dev/null | |
mv -f ${LOGS_PATH}/api_error.log ${LOGS_PATH}/api_error_${YESTERDAY}.log 2>/dev/null |
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
`tar -zcvf archive-name.tar.gz directory-name` | |
Where, | |
-z : Compress archive using gzip program | |
-c: Create archive | |
-v: Verbose i.e display progress while creating archive | |
-f: Archive File name |
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 DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci; | |
### add new column | |
ALTER TABLE material ADD COLUMN is_synchronized tinyint default '1' NOT NULL COMMENT '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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# handy dirty funcs used frequently | |
``` | |
- ps aux | grep mysqld | grep -v grep | awk '{print $2}' | xargs kill -9 ; #kill the programe by name | |
``` |
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/bin/env python | |
# encoding: utf-8 | |
import logging | |
import sys | |
FMT = ( | |
'[%(levelname)s][%(name)s:%(process)d][%(asctime)s]' + | |
': %(message)s') |
NewerOlder