Skip to content

Instantly share code, notes, and snippets.

View nickfox-taterli's full-sized avatar
😰
想哭

Tater Li nickfox-taterli

😰
想哭
View GitHub Profile
@nickfox-taterli
nickfox-taterli / bbr.sh
Created October 13, 2020 06:34
简单开启BBR
sudo bash -c 'echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf'
sudo bash -c 'echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf'
sudo sysctl -p
@nickfox-taterli
nickfox-taterli / config.json
Last active January 4, 2021 01:24
测试配置
{
"policy": {
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true
}
},
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
@nickfox-taterli
nickfox-taterli / adc.c
Created July 3, 2020 08:13
i.MX RT ADC 例子
/* Kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "timers.h"
#include "semphr.h"
/* Freescale includes. */
#include "fsl_device_registers.h"
#include "board.h"
@nickfox-taterli
nickfox-taterli / imxrt_lpuart.c
Created June 28, 2020 16:01
IMX RT LPUART 中断+FIFO
#include "board.h"
#include "fsl_lpuart.h"
#include "pin_mux.h"
#include "clock_config.h"
uint8_t txData[] = "Hello,World!";
uint8_t rxData[512];
typedef struct
@nickfox-taterli
nickfox-taterli / cf_speed.py
Created June 22, 2020 16:16
用下载方法查找CF最快下载速度的IP
import requests
import threadpool
from datetime import datetime
g_cnt = 0
def requests_test(ip):
global g_cnt
g_cnt = g_cnt + 1
g_cnt_str = '[' + str(g_cnt) + ']'
@nickfox-taterli
nickfox-taterli / Dockerfile.shadowsocks-libev
Created June 20, 2020 11:01
shadowsocks-libev Dockerfile
FROM alpine
MAINTAINER TaterLi <[email protected]>
RUN set -ex && \
apk add --no-cache udns && \
apk add --no-cache --virtual .build-deps \
git autoconf automake make build-base \
curl libev-dev c-ares-dev libtool linux-headers \
libsodium-dev mbedtls-dev pcre-dev tar udns-dev && \
cd /tmp/ && \
@nickfox-taterli
nickfox-taterli / Dockerfile.selenium
Created June 20, 2020 10:58
selenium Dockerfile 基础模板
FROM debian:buster
RUN apt update && \
apt upgrade -y && \
apt install --no-install-recommends --no-install-suggests -y wget unzip python3 python3-pip && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
dpkg -i google-chrome-stable_current_amd64.deb ; \
apt-get -f -y --no-install-recommends --no-install-suggests install && \
dpkg -i google-chrome-stable_current_amd64.deb && \
rm google-chrome-stable_current_amd64.deb && \
@nickfox-taterli
nickfox-taterli / O365.py
Created June 20, 2020 09:15
Office 365 教育版注册
import time
from faker import Faker
from selenium import webdriver
f = Faker()
with open("accounts.txt") as fh:
line = fh.readline()
while line:
email = line.strip()
line = fh.readline()
@nickfox-taterli
nickfox-taterli / html_dom_test.py
Created June 20, 2020 09:11
HTML文件XPath测试
# 导入 etree类
from lxml import etree
# 作为示例的 html文本
f = open("test.html",encoding='utf-8')
html = f.read()
dom = etree.HTML(html)
for b in range(len(dom.xpath('/html/body/table/tbody/tr/td[2]/text()'))):
@nickfox-taterli
nickfox-taterli / find_cf_ip.py
Created June 20, 2020 09:10
Find Cloudflare IP
import requests
import threadpool
from IPy import IP
def IP_Test(ip):
try:
r = requests.get('http://' + ip + '/', timeout=3)
if 'Direct IP access not allowed' in r.text:
print('可用:' + ip, flush=True)
else: