Skip to content

Instantly share code, notes, and snippets.

@piousdeer
piousdeer / wsl2-network.ps1
Created July 13, 2020 19:35 — forked from xmeng1/wsl2-network.ps1
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@piousdeer
piousdeer / nvfixbl.sh
Created August 21, 2021 18:00 — forked from redsfyre/nvfixbl.sh
Simple script I wrote for Arch Linux to use Nvidia brightness setting properly
#!/bin/bash
for x in \
nvidia-460.67-5-x86_64.pkg.tar.zst \
nvidia-dkms-460.67-1-x86_64.pkg.tar.zst \
nvidia-settings-460.67-1-x86_64.pkg.tar.zst \
nvidia-utils-460.67-1-x86_64.pkg.tar.zst \
; do
test -f $x || \