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
# 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 | |
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass | |
# Display all portproxy information | |
If ($Args[0] -eq "list") { | |
netsh interface portproxy show v4tov4; |
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
#!/bin/bash | |
# source : https://www.howtogeek.com/442332/how-to-work-with-variables-in-bash/ | |
echo "There were $# command line parameters" | |
echo "They are: $@" | |
echo "Parameter 1 is: $1" | |
echo "The script is called: $0" | |
# any old process so that we can report on the exit status | |
pwd | |
echo "pwd returned $?" |
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
import json | |
from typing import List | |
def run(args: List[str]): | |
filename = args[0] | |
with open(filename, "r") as f: | |
data = json.loads(f.read()) | |
original_entries = data['items'] |
OlderNewer