Skip to content

Instantly share code, notes, and snippets.

@usshen
usshen / Vitual keystroke example
Created November 6, 2022 05:59 — forked from chriskiehl/Vitual keystroke example
Python win32api simple Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,
#---------------------------------------------------#
# 配置文件需要放置在 $HOME/.config/clash/config.yml
# 或者运行目录下的config.yml
#---------------------------------------------------#
# 混合端口 HTTP和SOCKS5用一个端口
mixed-port: 7890
# HTTP 代理端口
#port: 7890
@usshen
usshen / windows_and_office_kms_setup.adoc
Created November 4, 2021 12:38 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@usshen
usshen / WireGuard-site-to-site.md
Created March 25, 2021 10:43 — forked from insdavm/WireGuard-site-to-site.md
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@usshen
usshen / invokeWithCookie.ps1
Created February 10, 2021 15:03 — forked from lawrencegripper/invokeWithCookie.ps1
Invoke-webrequest With Cookie
$downloadToPath = "c:\somewhere\on\disk\file.zip"
$remoteFileLocation = "http://somewhere/on/the/internet"
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$cookie = New-Object System.Net.Cookie
$cookie.Name = "cookieName"
$cookie.Value = "valueOfCookie"
@usshen
usshen / l10n_IETF_Language_tags.md
Created August 9, 2020 02:51 — forked from traysr/l10n_IETF_Language_tags.md
Commonly used IETF language tags