This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type TypeOfLiteral<T> = T extends string | |
| ? string | |
| : T extends number | |
| ? number | |
| : T extends boolean | |
| ? boolean | |
| : T extends bigint | |
| ? bigint | |
| : T extends Symbol | |
| ? Symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # credit: https://github.com/edwindijas | |
| $remoteport = bash.exe -c "ip a s 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; |
NewerOlder