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
#coding: utf-8 | |
import sys, time, json | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
from bottle.ext.websocket import GeventWebSocketServer | |
from bottle.ext.websocket import websocket | |
from bottle import get, run |
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
package MybatisPlugins; | |
import org.mybatis.generator.api.GeneratedXmlFile; | |
import org.mybatis.generator.api.IntrospectedTable; | |
import org.mybatis.generator.api.MyBatisGenerator; | |
import org.mybatis.generator.api.PluginAdapter; | |
import org.mybatis.generator.config.Configuration; | |
import org.mybatis.generator.config.xml.ConfigurationParser; | |
import org.mybatis.generator.internal.DefaultShellCallback; |
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
#!/usr/bin/env python | |
# coding:utf-8 | |
__version__ = '1.0.0' | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') |
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
#coding: utf-8 | |
import io, os, sys, platform | |
import requests, wcwidth | |
from PIL import Image | |
def PrintCmdQrcode(qrText): | |
'''print qrcode in cmd | |
see also https://github.com/xrdavies/qqbot/commit/21a91099db23b62898fbbcbd7a2e0d5af89ad0d8 | |
''' |
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
#!/usr/bin/env bash | |
if [ -n "${SUDO}" ]; then | |
echo "ERROR: Please run as root" | |
exit 1 | |
fi | |
# === pip install === | |
curl https://bootstrap.pypa.io/get-pip.py | python |
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
#coding: utf-8 | |
import struct | |
import requests,json,random | |
from gevent import monkey, spawn | |
monkey.patch_all() | |
proxies = {'all': 'http://127.0.0.1:8087'} | |
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/168 Safari/537.36', |
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
#!/bin/bash | |
# global variable | |
SVR_PORT=0 | |
RUN_USER=$USER | |
BIN_DIR=$HOME/bin | |
# resolve links - $0 may be a softlink | |
ARG0="$0" | |
while [ -h "$ARG0" ]; do |
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 random, string | |
# number | |
number = random.randint(1, 9) | |
# char | |
char = chr(random.randint(65, 90)) | |
char = random.choice(string.ascii_letters) | |
# string |
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
#!/bin/sh | |
# | |
# pptpd installation script on my own CentOS 7 box. | |
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 | |
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules | |
# | |
# Author: 2015 Steve Yang <[email protected]> | |
# The script comes with ABSOLUTELY NO WARRANTY. | |
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
祖 祖 外 外 | |
祖 祖 | |
母 父 父 母 | |
│ │ │ │ | |
└┬┘ └─┬─┘ | |
┌───┬─┴─┬──────────┐ ┌─────┴───┬───┐ | |
│ │ │ │ │ │ │ | |
姑 姑 嬸 叔 伯 伯 父 母 舅 舅 姨 姨 | |
丈 媽 嬸 父 母 父 親 親 舅 媽 媽 丈 |