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 | |
INTERFACE_NAME='ens18' | |
REDIR_PORT='1088' | |
# 开启代理 | |
start() | |
{ | |
echo "start tproxy begin" |
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
# This file describes the network interfaces available on your system | |
# For more information, see netplan(5). | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
enp1s0: | |
dhcp4: no | |
addresses: [192.168.31.2/24] | |
gateway4: 192.168.31.1 |
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
{ | |
"log": { | |
"loglevel": "info" | |
}, | |
"inbounds": [ | |
{ | |
"port": "1", | |
"protocol": "trojan", | |
"settings": { | |
"clients": [ |
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
// created by chatgpt | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
#include <memory> | |
#include <cstdio> | |
#include <cstring> | |
#include <stdexcept> | |
#include <curl/curl.h> |
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
{ | |
"log": { | |
"loglevel": "info" | |
}, | |
"inbounds": [ | |
{ | |
"listen": "127.0.0.1", | |
"port": 1234, | |
"protocol": "vmess", | |
"settings": { |
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
echo off | |
@echo off&(cd/d "%~dp0")&(cacls "%SystemDrive%\System Volume Information" >nul 2>&1)||(color 4f&echo 请右键“以管理员身份运行”&echo.&pause&exit /b) | |
netsh interface ip set address "以太网" static 192.168.31.100 255.255.255.0 192.168.31.3 1 | |
netsh interface ip set dns "以太网" static 8.8.8.8 | |
pause |
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
@echo off&(cd/d "%~dp0")&(cacls "%SystemDrive%\System Volume Information" >nul 2>&1)||(color 4f&echo 请右键“以管理员身份运行”&echo.&pause&exit /b) | |
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
mode=websocket;path=/;host=xxxxxx.cloudfront.net |
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
1. post issue request | |
acme.sh --issue -d example.com -d *.example.com --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please | |
2. add _acme-challenge TXT records(may be two or more, just add multiple records) in DNS vendor site | |
3. get cert | |
acme.sh --renew -d example.com -d *.example.com --yes-I-know-dns-manual-mode-enough-go-ahead-please |
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
class Solution: | |
def findKthLargest(self, nums: List[int], k: int) -> int: | |
def heapify(arr, i): #arr:数组。i:根节点 #向下调整函数 | |
left = 2*i+1 #左节点 | |
right = 2*i+2 #右节点 | |
smallst = i #假设i根节点为最小 | |
if left < k and arr[left] < arr[smallst]: | |
smallst = left#左子节点比最小还小则最小为右子节点 | |
if right < k and arr[right] < arr[smallst]: | |
smallst = right#右子节点比最小还小则最小为右子节点 |