This file contains hidden or 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
| mail.py -s "mail subject" liuzl@yxt.com < mail-content.txt |
This file contains hidden or 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
| doc2dash -A selenium-python-latest |
This file contains hidden or 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
| open(filename, 'w').close() |
This file contains hidden or 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
| firewall-cmd --add-rich-rule='rule family="ipv4" service name="mysql" source address="1.2.3.4" drop' |
This file contains hidden or 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
| from datetime import * | |
| datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S') |
This file contains hidden or 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
| logging.getLogger('requests').setLevel(logging.ERROR) |
This file contains hidden or 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
| signal.signal(signal.SIGTERM, signal.SIG_DFL) | |
| signal.signal(signal.SIGINT, signal.SIG_DFL) |
This file contains hidden or 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 IF NOT EXISTS octopus DEFAULT CHARSET utf8 COLLATE utf8_general_ci; |
This file contains hidden or 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
| git clone --mirror https://github.com/raveren/kint | |
| cd kint.git | |
| git remote add gitlab http://gitlab.example.com/raveren/kint.git | |
| git push gitlab --mirror | |
| git remote remove origin | |
| git remote add origin http://gitlab.example.com/raveren/kint.git | |
| git fetch --all |
This file contains hidden or 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
| import os | |
| from PIL import Image, ImageEnhance, ImageDraw, ImageFont | |
| def text2img(text, font_color="Black", font_size=30): | |
| """生成内容为 TEXT 的水印""" | |
| font = ImageFont.truetype('/Users/liuzenglu/Documents/yahei.ttf', font_size) | |
| # 多行文字处理 | |
| text = text.split('\n') |