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 / speedtest_fake.py
Created June 1, 2022 09:37
新的speedtest欺骗
import uuid
import json
import requests
# 测速点ID,可以自己覆盖,默认选系统最优.
server_id = json.loads(requests.get('https://cli.speedtest.net/api/cli/config').text)['servers'][0]['id']
# 下载速度(Mbps)
download_speed = 1000
@nickfox-taterli
nickfox-taterli / Payjs.php
Created March 1, 2022 09:30
V2Board Payjs 支付接口
<?php
namespace App\Payments;
class Payjs {
public function __construct($config)
{
$this->config = $config;
}
public function form()
@nickfox-taterli
nickfox-taterli / sniproxy.conf
Created January 31, 2022 07:13
sniproxy.conf
user daemon
pidfile /var/tmp/sniproxy.pid
error_log {
syslog daemon
priority notice
}
resolver {
nameserver 8.8.8.8
nameserver 8.8.4.4 # local dns should be better
mode ipv6_first
@nickfox-taterli
nickfox-taterli / main.c
Created January 23, 2022 03:52
STM32L475 IOT NFC Demo
#include "stm32l4xx_ll_i2c.h"
#include "stm32l4xx_ll_crs.h"
#include "stm32l4xx_ll_rcc.h"
#include "stm32l4xx_ll_bus.h"
#include "stm32l4xx_ll_system.h"
#include "stm32l4xx_ll_exti.h"
#include "stm32l4xx_ll_cortex.h"
#include "stm32l4xx_ll_utils.h"
#include "stm32l4xx_ll_pwr.h"
#include "stm32l4xx_ll_dma.h"
@nickfox-taterli
nickfox-taterli / adc_dma.c
Created January 18, 2022 09:30
ADC + DMA / LPCOpen
#include "board.h"
#include "mem_tests.h"
/*****************************************************************************
* Public types/enumerations/variables
****************************************************************************/
static volatile uint8_t channelTC, dmaChannelNum;
uint32_t DMAbuffer[255];
uint16_t dataADC;
@nickfox-taterli
nickfox-taterli / brcm_patchram_plus.c
Created November 26, 2021 08:51
brcm_patchram_plus.c
/*******************************************************************************
*
* Copyright (C) 2009-2011 Broadcom Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
#!/bin/bash
cd /tmp
# 生成密钥
wg genkey | tee privatekey | wg pubkey > publickey
# 服务器私钥
ServerKey=`cat privatekey`
# 服务器公钥
ServerPub=`cat publickey`
@nickfox-taterli
nickfox-taterli / install_dnsproxy.sh
Last active February 27, 2022 14:36
install_dnsproxy bridge v4/v6 and v6_fist
get_ip(){
local IP=$( ip addr | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | egrep -v "^192\.168|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-2]\.|^10\.|^127\.|^255\.|^0\." | head -n 1 )
[ -z ${IP} ] && IP=$( wget -qO- -t1 -T2 ipv4.icanhazip.com )
[ -z ${IP} ] && IP=$( wget -qO- -t1 -T2 ipinfo.io/ip )
echo ${IP}
}
install_dnsproxy(){
apt -y install dnsmasq wget git autotools-dev cdbs debhelper dh-autoreconf dpkg-dev gettext libev-dev libpcre3-dev libudns-dev pkg-config fakeroot devscripts sniproxy
#!/bin/bash
Font_Black="\033[30m";
Font_Red="\033[31m";
Font_Green="\033[32m";
Font_Yellow="\033[33m";
Font_Blue="\033[34m";
Font_Purple="\033[35m";
Font_SkyBlue="\033[36m";
Font_White="\033[37m";
@nickfox-taterli
nickfox-taterli / test.sh
Last active September 30, 2021 09:18
test
userdel -r admin
apt install smokeping
cat >/etc/systemd/system/smokeping.service <<EOF
[Unit]
Description=Smokeping Service, Network Latency Graphical Viewer
After=network.service
[Service]
Type=forking