using Byte = std::uint8_t;
#include <vector>
#!/usr/bin/env bash | |
# | |
# Auto install latest kernel for TCP BBR | |
# | |
# System Required: CentOS 6+, Debian7+, Ubuntu12+ | |
# | |
# Copyright (C) 2016-2017 Teddysun <i@teddysun.com> | |
# | |
# URL: https://teddysun.com/489.html | |
# |
#coding:utf-8 | |
import subprocess | |
import time | |
from fabric.api import settings, run, env | |
def wait_process_end(process, timeout): | |
if timeout <= 0: | |
process.wait() | |
return 0 |
# -*- coding: utf-8 -*- | |
#!/usr/bin/env python | |
# @Author: asyncliu | |
# @Date: 2017-08-12 10:32:58 | |
# @Last Modified by: asyncliu | |
# @Last Modified time: 2017-10-20 17:40:41 | |
# @Project: 日志工具类 | |
import logging, sys | |
import logging.handlers |
# 一键安装shadowsocks | |
# wget --no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh && chmod +x shadowsocks.sh && ./shadowsocks.sh 2>&1 | tee shadowsocks.log | |
# 卸载方法 | |
# ./shadowsocks.sh uninstall | |
# 配置文件路径 | |
# /etc/shadowsocks.json | |
# 常用命令: | |
#启动: | |
# /etc/init.d/shadowsocks start | |
#停止: |
package main | |
import ( | |
"bufio" | |
"log" | |
"net/rpc" | |
"os" | |
) | |
func main() { |
// sublime for mac settings | |
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Colorsublime - Themes/Cozy.tmTheme", | |
"create_window_at_startup": false, | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "monaco", | |
"font_size": 16, |
#!/usr/bin/env python | |
# coding: utf8 | |
import os | |
import sys | |
import calendar | |
import datetime | |
# 函数运行时间测试装饰器 | |
import time | |
from functools import wraps |
# coding: utf-8 | |
import types | |
class Task(object): | |
taskid = 0 | |
def __init__(self, target): | |
Task.taskid += 1 | |
self.tid = Task.taskid |