Skip to content

Instantly share code, notes, and snippets.

View celeron633's full-sized avatar
👻
defunct

celeron633 celeron633

👻
defunct
View GitHub Profile
@celeron633
celeron633 / OLED.c
Created August 29, 2024 15:12
OLED.c from jiangxiekeji.com
/***************************************************************************************
* 本程序由江协科技创建并免费开源共享
* 你可以任意查看、使用和修改,并应用到自己的项目之中
* 程序版权归江协科技所有,任何人或组织不得将其据为己有
*
* 程序名称: 0.96寸OLED显示屏驱动程序(4针脚I2C接口)
* 程序创建时间: 2023.10.24
* 当前程序版本: V1.2
* 当前版本发布时间: 2024.4.24
#!/usr/bin/python3
import subprocess
import os
import sys
fwd_map = {8080: {8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 9090}, 443: {1443, 2443, 3443, 4443, 5443, 6443, 7443, 8443, 9443, 10443}}
ipt_template = 'iptables -t nat -A PREROUTING -p tcp --dport {} -j REDIRECT --to-port {}'
ipt_disable_template = 'iptables -t nat -D PREROUTING -p tcp --dport {} -j REDIRECT --to-port {}'
#!/usr/bin/python3
import subprocess
import os
import sys
https_port_to_disable = [443, 1443, 2443, 3443, 4443, 5443, 6443, 7443, 8443, 9443, 10443]
ipt_template = 'iptables -t filter -A INPUT -p tcp --dport {} -j DROP'
ipt_disable_template = 'iptables -t filter -D INPUT -p tcp --dport {} -j DROP'
@celeron633
celeron633 / config.json
Created April 27, 2024 02:12
singbox tproxy config
{
"log": {
"level": "warn",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tcp://1.1.1.1",
@celeron633
celeron633 / vsftpd.conf
Created March 23, 2024 14:15
my vsftpd config
anonymous_enable=NO
local_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
@celeron633
celeron633 / test.py
Created January 20, 2024 01:50
pandas read xlsx with first row
import os
import pandas as pd
try:
sheet = pd.read_excel("test.xlsx", header=None)
except Exception as e:
print('read_excel failed')
exit(-1)
print(sheet.iloc[0,0])
@celeron633
celeron633 / smb.conf
Created January 1, 2024 05:43
new samba config for non-authentication share
[global]
server role = standalone server
workgroup = WORKGROUP
max log size = 1000
logging = file
security = user
map to guest = bad user
@celeron633
celeron633 / make.conf
Last active January 20, 2024 01:49
my gentoo make.conf for binary install
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
@celeron633
celeron633 / config.ymal
Created August 1, 2023 09:25
minimal clash cfg file for trojan
port: 7890 # port of HTTP
socks-port: 7891 # port of SOCKS5
allow-lan: false
mode: rule
proxies:
- name: "t1"
type: trojan
server: xx.com
@celeron633
celeron633 / v2ray-tproxy-v2.sh
Created April 1, 2023 03:57
iptables script for v2ray transparent proxy
#!/bin/bash
INTERFACE_NAME='ens18'
REDIR_PORT='1088'
# 开启代理
start()
{
echo "start tproxy begin"