How to set up multiple accounts with Mutt E-mail Client
Thanks to this article by Christoph Berg
Directories and files
~/
#!/bin/bash | |
# | |
# tc uses the following units when passed as a parameter. | |
# kbps: Kilobytes per second | |
# mbps: Megabytes per second | |
# kbit: Kilobits per second | |
# mbit: Megabits per second | |
# bps: Bytes per second | |
# Amounts of data can be specified in: | |
# kb or k: Kilobytes |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"sync" | |
"time" | |
) |
#!/system/bin/sh | |
echo 'function_graph' >/sys/kernel/debug/tracing/current_tracer | |
echo 96000 > /d/tracing/buffer_size_kb | |
echo $$ > /sys/kernel/debug/tracing/set_ftrace_pid | |
echo 1 > /sys/kernel/debug/tracing/tracing_on | |
( | |
sleep 10 # stop tracing after this second. |
/* | |
Before using this tasks.json you may like to consider trying the VS Code extension, `rust-lang.rust` | |
Marketplace: https://marketplace.visualstudio.com/items?itemName=rust-lang.rust | |
Source: https://github.com/rust-lang/rls-vscode | |
*/ | |
// Available variables which can be used inside of strings. | |
// ${workspaceRoot}: the root folder of the team |
SHELL := /bin/bash | |
REV := $(shell git rev-parse HEAD) | |
CHANGES := $(shell test -n "$$(git status --porcelain)" && echo '+CHANGES' || true) | |
TARGET := packer-provisioner-itamae-local | |
VERSION := $(shell cat VERSION) | |
OS := darwin freebsd linux openbsd | |
ARCH := 386 amd64 |
# Makefile template for Static library. | |
# 1. Compile every *.cpp in the folder | |
# 2. All obj files under obj folder | |
# 3. static library .a at lib folder | |
# 4. run 'make dirmake' before calling 'make' | |
CC = g++ | |
OUT_FILE_NAME = libNAME.a |
add_user(){ | |
echo -e "\033[37;41m给新用户起个名字,不能和已有用户重复\033[0m" | |
read -p "请输入用户名:" newname | |
cd /etc/wireguard/ | |
cp client.conf $newname.conf | |
wg genkey | tee temprikey | wg pubkey > tempubkey | |
ipnum=$(grep Allowed /etc/wireguard/wg0.conf | tail -1 | awk -F '[ ./]' '{print $6}') | |
newnum=$((10#${ipnum}+1)) | |
sed -i 's%^PrivateKey.*$%'"PrivateKey = $(cat temprikey)"'%' $newname.conf | |
sed -i 's%^Address.*$%'"Address = 10.0.0.$newnum\/24"'%' $newname.conf |
Thanks to this article by Christoph Berg
Directories and files
~/
#!/bin/bash | |
interface=lo | |
ip=10.0.0.1 | |
delay=100ms | |
tc qdisc add dev $interface root handle 1: prio | |
tc filter add dev $interface parent 1:0 protocol ip prio 1 u32 match ip dst $ip flowid 2:1 | |
tc qdisc add dev $interface parent 1:1 handle 2: netem delay $delay |
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
''' | |
Copyleft (c) 2015 breakwa11 | |
https://github.com/breakwa11/shadowsocks-rss | |
''' | |
import logging | |
import socket |