Skip to content

Instantly share code, notes, and snippets.

@ylck
ylck / Online_Full.ini
Last active May 1, 2026 00:49
Online_Full.ini
[node_pref]
udp_flag=true
tcp_fast_open_flag=true
sort_flag=false
skip_cert_verify_flag=true
filter_deprecated_nodes=false
; --- 节点清洗与重命名 (强迫症福音) ---
add_emoji=true
remove_old_emoji=true
exclude_remarks=(官网|到期|剩余|重置|更新|流量|VIP|群)
@ylck
ylck / README.md
Created February 21, 2026 16:19 — forked from MarshalW/README.md
使用ssh实现socks5代理

使用ssh实现socks5代理

在linux和macOS下此命令有效:

ssh -D 1337 -q -C -N your_server
  • 假设本地用户ssh key已经设置到your_server
  • 本地1337端口即socks5代理的端口
@ylck
ylck / RestartRDPClip.bat
Created October 9, 2025 12:01 — forked from markalanevans/RestartRDPClip.bat
Remote Desktop Clipboard Fix
cls
taskkill /F /FI "USERNAME eq %username%" /IM rdpclip.exe
ping -n 1 -w 1000 1.1.1.1>nul
start rdpclip.exe
@ylck
ylck / rules.sh
Last active April 5, 2025 19:27 — forked from thisIsIan-W/rules.sh
#!/bin/bash
# Note:
# When the script prompts you to provide the dedicated configuration link, please copy and use the RAW link of your own Gist!
#
# 注意:
# 当脚本提示你提供专属配置链接时,请使用你自己的Gist的RAW链接!
# Required.
@ylck
ylck / 0_kubectl related script
Created May 19, 2021 05:36 — forked from myclau/0_kubectl related script
kubectl related script
#!/bin/bash
# Scale DOWN all Turbonetes PODs to 0
function turbo_stop_all_pods {
turbo_stop_all_pods=$(kubectl get deploy -n turbonomic --no-headers=true | cut -d ' ' -f1 | xargs -I % kubectl scale --replicas=0 deployment/% -n turbonomic)
while true; do
if `kubectl get pods -n turbonomic | grep -v STATUS | wc -l` -gt 0 then
echo -e "turbo_STOP_all_pods: Waiting on Turbonetes POD(s) to TERMINATE, so far: \n`kubectl get pods -n turbonomic | grep -v NAME`"
elif
[[ "$counter" -gt 30 ]]; then;
echo "MAX Counter Reached! One or more PODs are stuck ##TERMINATING##, intervening to kill it/them"
@ylck
ylck / kubectl-root-in-host-nopriv.pks.sh
Created May 6, 2021 10:05 — forked from jjo/kubectl-root-in-host-nopriv.sh
Yeah. Get a root shell at any Kubernetes *node* via `privileged: true` + `nsenter` sauce. PodSecurityPolicy will save us. DenyExecOnPrivileged didn't (kubectl-root-in-host-nopriv.sh exploits it)
#!/bin/sh
# Launch a Pod ab-using a hostPath mount to land on a Kubernetes node cluster as root
# without requiring `privileged: true`, in particular can abuse `DenyExecOnPrivileged`
# admission controller.
# Pod command in turn runs a privileged container using node's /var/run/docker.sock.
#
# Tweaked for PKS nodes, which run their docker stuff from different
# /var/vcap/... paths
node=${1}
case "${node}" in
@ylck
ylck / autossh.service
Created December 20, 2019 08:08 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@ylck
ylck / ss-redir 透明代理.md
Created October 5, 2018 11:50 — forked from wen-long/ss-redir 透明代理.md
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
@ylck
ylck / centos_bstick.sh
Created October 26, 2017 06:40 — forked from vkanevska/centos_bstick.sh
Custom CentOS 7 bootable ISO / Support UEFI & Secure boot
#!/bin/bash
# create custom bootable iso for CentOS 7 with kickstart
if [ $# -lt 2 ]
then
echo "Usage1: $0 path2iso path2kickstart"
exit 1
else
if [ ! -f $1 ]
then