Skip to content

Instantly share code, notes, and snippets.

Avatar

Xiangqun Zhang zhxq

  • Syracuse University
  • Syracuse/Anshan
View GitHub Profile
@zhxq
zhxq / wsl2-network.ps1
Created Jun 6, 2021 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
View wsl2-network.ps1
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@zhxq
zhxq / gist:d34df0ce34ed34b6d796
Created Oct 21, 2014
Mac OS X 10.10 Install.DMG Flashdisk Dumper
View gist:d34df0ce34ed34b6d796
#!/bin/bash
if [[ $1 == "" ]]; then
echo "欢迎您使用由zhxq开发的Mac OS X 10.10制作安装盘工具!"
echo "本软件以CC-BY-SA 3.0协议发布。"
echo "本软件涉及到磁盘操作,若不当使用可能会造成数据丢失!"
echo "本人对一切数据丢失概不负责。"
echo "操作有价,数据无价!"
echo "ver:1.1 beta"
echo "www.zhxqweb.com"
echo "zhxq@zhxqweb.com"