Skip to content

Instantly share code, notes, and snippets.

View Postroggy's full-sized avatar
🐷
Out sick

oasis Postroggy

🐷
Out sick
  • Tierra
View GitHub Profile
@Postroggy
Postroggy / wsl with CFW .txt
Created January 26, 2023 18:52
wsl使用windows的clash代理
在Windows terminal中关闭 WSL虚拟网卡的防火墙
# 直接放开 `vEthernet (WSL)` 这张网卡的防火墙
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
-----
在 wsl 中。~/.bashrc
hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export http_proxy=http://${hostip}:7890/
export https_proxy=http://${hostip}:7890/
export all_proxy=socks5://${hostip}:7890/
@Postroggy
Postroggy / wsl with CFW .txt
Created January 26, 2023 18:52
wsl使用windows的clash代理
在Windows terminal中关闭 WSL虚拟网卡的防火墙
# 直接放开 `vEthernet (WSL)` 这张网卡的防火墙
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
-----
在 wsl 中。~/.bashrc
hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export http_proxy=http://${hostip}:7890/
export https_proxy=http://${hostip}:7890/
export all_proxy=socks5://${hostip}:7890/
@Postroggy
Postroggy / WSL2 network resolve work around
Created January 26, 2023 18:22
WSL2 不能正确分配IP地址的解决方法。
echo "Restarting WSL Service"
Restart-Service LxssManager
echo "Restarting Host Network Service"
Stop-Service -name "hns"
Start-Service -name "hns"
echo "Restarting Hyper-V adapters"
Get-NetAdapter -IncludeHidden | Where-Object `
{$_.InterfaceDescription.StartsWith('Hyper-V Virtual Switch Extension Adapter')} `
| Disable-NetAdapter -Confirm:$False
Get-NetAdapter -IncludeHidden | Where-Object `
@Postroggy
Postroggy / Download-AppxPackage.ps1
Created May 25, 2022 11:59 — forked from YoraiLevi/Download-AppxPackage.ps1
Download Windows Store Apps with Powershell
#https://serverfault.com/questions/1018220/how-do-i-install-an-app-from-windows-store-using-powershell
#Usage:
# > Download-AppxPackage "https://www.microsoft.com/p/dynamic-theme/9nblggh1zbkw" "$ENV:USERPROFILE\Desktop"
# C:\Users\user\Desktop\55888ChristopheLavalle.DynamicTheme_1.4.30233.0_neutral_~_jdggxwd41xcr0.AppxBundle
# C:\Users\user\Desktop\55888ChristopheLavalle.DynamicTheme_1.4.30234.0_neutral_~_jdggxwd41xcr0.AppxBundle
# C:\Users\user\Desktop\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x64__8wekyb3d8bbwe.Appx
# C:\Users\user\Desktop\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x64__8wekyb3d8bbwe.Appx
# C:\Users\user\Desktop\Microsoft.Services.Store.Engagement_10.0.19011.0_x64__8wekyb3d8bbwe.Appx
# C:\Users\user\Desktop\Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe.Appx
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Francophonie\Eudic\Customer Info]
"SerialCode"="cracked by Archon"
"TimesLeft3"=dword:000c85e7
"regDate"="2019/12/30 00:00:00"
"LicenseCode"="cracked by Archon"
@Postroggy
Postroggy / WindowsStoreApps
Created February 15, 2022 08:47 — forked from DuckTeamOfficial/WindowsStoreApps
Remove or Reinstall Windows Store Apps on Windows 10
Note: Run PowerShell as Administrator!
Delete all builtin apps except photo viewer and calculator (xbox will throw error as game bar is not removed but everything else is!);
Get-AppxPackage -allusers *3dbuilder* | Remove-AppxPackage
Get-AppxPackage -allusers *alarms* | Remove-AppxPackage
Get-AppxPackage -allusers *appconnector* | Remove-AppxPackage
Get-AppxPackage -allusers *appinstaller* | Remove-AppxPackage
Get-AppxPackage -allusers *communicationsapps* | Remove-AppxPackage
Get-AppxPackage -allusers *camera* | Remove-AppxPackage