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
| package main | |
| //#include "capture.h" | |
| import "C" | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "log" | |
| "os" | |
| "sync" |
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 errs []error | |
| func (e errs) Error() string { | |
| s := make([]string,len(e)) | |
| for i, err := range e { | |
| s[i] = err.Error() | |
| } | |
| return strings.Join(s,",") | |
| } |
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
| # Setup WSL | |
| wsl --update | |
| wsl --install -d Debian | |
| # Enter WSL | |
| wsl | |
| # Setup base system | |
| sudo apt update | |
| sudo apt install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg2 vim |
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
| # Function to download the tar file | |
| function Download-NixOS { | |
| $url = "https://github.com/nix-community/nixos-wsl/releases/latest/download/nixos-wsl.tar.gz" | |
| $output = "$env:TEMP\nixos-wsl.tar.gz" | |
| Invoke-WebRequest -Uri $url -OutFile $output | |
| return $output | |
| } | |
| # Function to check if WSL is installed and install if it's not | |
| function Install-WSL { |
OlderNewer