Skip to content

Instantly share code, notes, and snippets.

View czyt's full-sized avatar
🍒
Working as a Coder

虫子樱桃 czyt

🍒
Working as a Coder
View GitHub Profile
https://jichang.jinsanjiaohs.com/
https://1.lelian.co/
https://xunxspeed.top/
https://vb.cx100.top/
https://wymv.top/
https://hk.hanliang.icu/
https://ftzcc01.fliggycloud.pro/
https://jindouyun88.life/
https://zhuiyun.top/
https://panel.freeflyvpn.com/
@czyt
czyt / ms-edge-tts-api.md
Created January 17, 2024 05:14 — forked from wilinz/ms-edge-tts-api.md
微软edge-tts-api(大声朗读协议)
@czyt
czyt / systemenv.cs
Created July 19, 2023 13:45
write app current working dir to windows system Path
using System;
using System.Security.Principal;
namespace AddCurrentDirToPath
{
internal class Program
{
const string envPathKey = "Path";
public static bool IsAdministrator()
{
@czyt
czyt / default.custom.yaml
Created June 8, 2023 08:41 — forked from lewangdev/default.custom.yaml
雾凇拼音自定义配置,MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
patch:
# 菜单
menu:
page_size: 8 # 候选词个数
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
# 中西文切换
#
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。
@czyt
czyt / README.md
Created January 1, 2023 02:41 — forked from acmacalister/README.md
WebSocket through Cloudflare Access

Overview

These are instructions on setting up Access in front of a origin serving WebSockets. This example contains client code for a client that authenticates through Access using mTLS.

Access

In the Cloudflare Dashboard, configure an Access policy that contains a service token. The developer docs has steps on how to do this:

https://developers.cloudflare.com/access/service-auth/mtls-testing/

@czyt
czyt / cloudflaretool.go
Last active September 19, 2022 16:54
cloudflare ddns and pages deploy cleaner&helper
package main
import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/cloudflare/cloudflare-go"
"io"
"log"
@czyt
czyt / autocert.go
Created August 4, 2022 05:17 — forked from NHOrus/autocert.go
Currently cobbled autocerted file server thingy
package main
import (
"crypto/tls"
"fmt"
"golang.org/x/crypto/acme/autocert"
"io"
"log"
"net/http"
"time"
@czyt
czyt / dial-mysql-via-ssh.go
Created March 8, 2022 15:19 — forked from vinzenz/dial-mysql-via-ssh.go
Using MySQL / MariaDB via SSH in Golang
package main
import (
"database/sql"
"fmt"
"net"
"os"
"github.com/go-sql-driver/mysql"
"golang.org/x/crypto/ssh"
@czyt
czyt / dial-pq-via-ssh.go
Created March 8, 2022 15:19 — forked from vinzenz/dial-pq-via-ssh.go
Use postgres via SSH in Golang
package main
import (
"database/sql"
"database/sql/driver"
"fmt"
"net"
"os"
"time"

WARNING: interfaces can enumarate differently:

ufw status
#iptables -F
#iptables --table nat --append POSTROUTING --out-interface wlxe0b94db737c9 -j MASQUERADE
#iptables --table nat --append POSTROUTING --out-interface enp0s20u1u1 -j MASQUERADE
iptables --table nat --append POSTROUTING --out-interface enp0s20u1u2 -j MASQUERADE
#iptables --append FORWARD --in-interface enx1cba8c9bbeb5 -j ACCEPT
#iptables --append FORWARD --in-interface enx9884e391a556 -j ACCEPT
iptables --append FORWARD --in-interface enx9884e391a559 -j ACCEPT