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
set nu | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set autoindent | |
set nowrap | |
set expandtab | |
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 | |
set termencoding=utf-8 |
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"draw_minimap_border": true, | |
"font_face": "monaco", | |
"font_size": 14, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
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 | |
######################################### | |
#Function: update source | |
#Usage: bash update_source.sh | |
#Author: Customer service department | |
#Company: Alibaba Cloud Computing | |
#Version: 5.0 | |
######################################### | |
check_os_release() |
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 | |
# -*- coding:utf-8 -*- | |
from hsdo import make_app | |
from tornado.testing import AsyncHTTPSTestCase | |
from tornado.escape import json_encode | |
class BaseAsyncHTTPSTestCase(AsyncHTTPSTestCase): | |
def get_app(self): |
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 zip_dir(zipfile_path, zip_dir_path, file_tyle='*'): | |
with zipfile.ZipFile(zipfile_path, 'w') as z: | |
glob_file = glob.glob(os.path.join(zip_dir_path, file_tyle)) | |
for filepath in glob_file: | |
z.write(filepath, os.path.basename(filepath)) |
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
# /etc/mysql/mysql.conf.d/mysqld.cnf | |
[mysqld] | |
character-set-server=utf8 | |
collation-server=utf8_general_ci |
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 | |
username=$1 | |
useradd -m -s /bin/bash $username | |
usermod -aG sudo $username |
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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import socket | |
def scan_port(port_num, host): | |
s = socket.socket() | |
socket.setdefaulttimeout(2) | |
try: |
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
li { | |
text-align: center; | |
} | |
p {display: inline-block;text-align: left;} |
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 | |
# -*- coding: utf-8 -*- | |
''' | |
nginx 的日志在存 json 的时候会把 “ 转义成 \x22 | |
此脚本实现类似于 Unix tail -f 但是会还原原始 json 数据 | |
可以单独执行不依赖于第三方 package | |
Python2.+ | Python3.+ | |
''' |
OlderNewer