NobGit
public imalexnord read

ms.open

Adds Mac "Open ." command to Windows

Languages

Repository composition by tracked source files.

PowerShell
PowerShell 100%
Create file Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/ms.open.git
ssh://[email protected]:2222/user/imalexnord/ms.open.git

Trace

bin/MSOpen.ps1

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

MSOpen.ps1 on main
Author Date Commit Line Code
Alex Nord 11 days ago a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
1
[CmdletBinding()]
Open commit View diff
1 [CmdletBinding()]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
2
param(
Open commit View diff
2 param(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
3
    [Parameter(Position = 0, Mandatory = $true)]
Open commit View diff
3 [Parameter(Position = 0, Mandatory = $true)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
4
    [string]$Command,
Open commit View diff
4 [string]$Command,
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
5
Open commit View diff
5
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
6
    [Parameter(Position = 1, ValueFromRemainingArguments = $true)]
Open commit View diff
6 [Parameter(Position = 1, ValueFromRemainingArguments = $true)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
7
    [string[]]$Arguments
Open commit View diff
7 [string[]]$Arguments
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
8
)
Open commit View diff
8 )
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
9
Open commit View diff
9
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
10
Set-StrictMode -Version Latest
Open commit View diff
10 Set-StrictMode -Version Latest
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
11
$ErrorActionPreference = 'Stop'
Open commit View diff
11 $ErrorActionPreference = 'Stop'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
12
$Arguments = @($Arguments)
Open commit View diff
12 $Arguments = @($Arguments)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
13
Open commit View diff
13
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
14
function Resolve-MSOpenPath {
Open commit View diff
14 function Resolve-MSOpenPath {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
15
    param(
Open commit View diff
15 param(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
16
        [Parameter(Mandatory)]
Open commit View diff
16 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
17
        [string]$Path
Open commit View diff
17 [string]$Path
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
18
    )
Open commit View diff
18 )
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
19
Open commit View diff
19
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
20
    $resolved = Resolve-Path -LiteralPath $Path -ErrorAction Stop
Open commit View diff
20 $resolved = Resolve-Path -LiteralPath $Path -ErrorAction Stop
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
21
    return $resolved.Path
Open commit View diff
21 return $resolved.Path
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
22
}
Open commit View diff
22 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
23
Open commit View diff
23
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
24
function Invoke-Open {
Open commit View diff
24 function Invoke-Open {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
25
    param([string[]]$Args)
Open commit View diff
25 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
26
Open commit View diff
26
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
27
    $target = if ($Args.Count -gt 0) {
Open commit View diff
27 $target = if ($Args.Count -gt 0) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
28
        $Args[0]
Open commit View diff
28 $Args[0]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
29
    }
Open commit View diff
29 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
30
    else {
Open commit View diff
30 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
31
        (Get-Location).Path
Open commit View diff
31 (Get-Location).Path
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
32
    }
Open commit View diff
32 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
33
Open commit View diff
33
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
34
    if (Test-Path -LiteralPath $target) {
Open commit View diff
34 if (Test-Path -LiteralPath $target) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
35
        $target = Resolve-MSOpenPath -Path $target
Open commit View diff
35 $target = Resolve-MSOpenPath -Path $target
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
36
    }
Open commit View diff
36 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
37
Open commit View diff
37
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
38
    Start-Process -FilePath $target
Open commit View diff
38 Start-Process -FilePath $target
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
39
}
Open commit View diff
39 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
40
Open commit View diff
40
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
41
function Invoke-Reveal {
Open commit View diff
41 function Invoke-Reveal {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
42
    param([string[]]$Args)
Open commit View diff
42 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
43
Open commit View diff
43
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
44
    if ($Args.Count -lt 1) {
Open commit View diff
44 if ($Args.Count -lt 1) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
45
        throw 'Usage: reveal <file-or-folder>'
Open commit View diff
45 throw 'Usage: reveal <file-or-folder>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
46
    }
Open commit View diff
46 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
47
Open commit View diff
47
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
48
    $target = Resolve-MSOpenPath -Path $Args[0]
Open commit View diff
48 $target = Resolve-MSOpenPath -Path $Args[0]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
49
Open commit View diff
49
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
50
    if (Test-Path -LiteralPath $target -PathType Container) {
Open commit View diff
50 if (Test-Path -LiteralPath $target -PathType Container) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
51
        Start-Process -FilePath 'explorer.exe' -ArgumentList "`"$target`""
Open commit View diff
51 Start-Process -FilePath 'explorer.exe' -ArgumentList "`"$target`""
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
52
        return
Open commit View diff
52 return
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
53
    }
Open commit View diff
53 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
54
Open commit View diff
54
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
55
    Start-Process -FilePath 'explorer.exe' -ArgumentList "/select,`"$target`""
Open commit View diff
55 Start-Process -FilePath 'explorer.exe' -ArgumentList "/select,`"$target`""
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
56
}
Open commit View diff
56 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
57
Open commit View diff
57
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
58
function Invoke-CopyPath {
Open commit View diff
58 function Invoke-CopyPath {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
59
    param([string[]]$Args)
Open commit View diff
59 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
60
Open commit View diff
60
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
61
    $target = if ($Args.Count -gt 0) {
Open commit View diff
61 $target = if ($Args.Count -gt 0) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
62
        Resolve-MSOpenPath -Path $Args[0]
Open commit View diff
62 Resolve-MSOpenPath -Path $Args[0]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
63
    }
Open commit View diff
63 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
64
    else {
Open commit View diff
64 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
65
        (Get-Location).Path
Open commit View diff
65 (Get-Location).Path
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
66
    }
Open commit View diff
66 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
67
Open commit View diff
67
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
68
    Set-Clipboard -Value $target
Open commit View diff
68 Set-Clipboard -Value $target
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
69
    Write-Output $target
Open commit View diff
69 Write-Output $target
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
70
}
Open commit View diff
70 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
71
Open commit View diff
71
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
72
function Invoke-Paths {
Open commit View diff
72 function Invoke-Paths {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
73
    $entries = $env:Path -split ';' |
Open commit View diff
73 $entries = $env:Path -split ';' |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
74
        ForEach-Object { $_.Trim() } |
Open commit View diff
74 ForEach-Object { $_.Trim() } |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
75
        Where-Object { $_ }
Open commit View diff
75 Where-Object { $_ }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
76
Open commit View diff
76
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
77
    $index = 1
Open commit View diff
77 $index = 1
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
78
    foreach ($entry in $entries) {
Open commit View diff
78 foreach ($entry in $entries) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
79
        [pscustomobject]@{
Open commit View diff
79 [pscustomobject]@{
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
80
            Number = $index
Open commit View diff
80 Number = $index
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
81
            Path   = $entry
Open commit View diff
81 Path = $entry
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
82
            Exists = Test-Path -LiteralPath $entry
Open commit View diff
82 Exists = Test-Path -LiteralPath $entry
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
83
        }
Open commit View diff
83 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
84
        $index++
Open commit View diff
84 $index++
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
85
    }
Open commit View diff
85 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
86
}
Open commit View diff
86 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
87
Open commit View diff
87
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
88
function Invoke-Which {
Open commit View diff
88 function Invoke-Which {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
89
    param([string[]]$Args)
Open commit View diff
89 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
90
Open commit View diff
90
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
91
    if ($Args.Count -lt 1) {
Open commit View diff
91 if ($Args.Count -lt 1) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
92
        throw 'Usage: which <command>'
Open commit View diff
92 throw 'Usage: which <command>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
93
    }
Open commit View diff
93 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
94
Open commit View diff
94
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
95
    $commands = Get-Command -Name $Args[0] -All -ErrorAction Stop
Open commit View diff
95 $commands = Get-Command -Name $Args[0] -All -ErrorAction Stop
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
96
Open commit View diff
96
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
97
    foreach ($item in $commands) {
Open commit View diff
97 foreach ($item in $commands) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
98
        $location = $null
Open commit View diff
98 $location = $null
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
99
Open commit View diff
99
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
100
        if ($item.PSObject.Properties.Name -contains 'Path' -and $item.Path) {
Open commit View diff
100 if ($item.PSObject.Properties.Name -contains 'Path' -and $item.Path) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
101
            $location = $item.Path
Open commit View diff
101 $location = $item.Path
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
102
        }
Open commit View diff
102 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
103
        elseif ($item.Source) {
Open commit View diff
103 elseif ($item.Source) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
104
            $location = $item.Source
Open commit View diff
104 $location = $item.Source
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
105
        }
Open commit View diff
105 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
106
        elseif ($item.Definition) {
Open commit View diff
106 elseif ($item.Definition) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
107
            $location = $item.Definition
Open commit View diff
107 $location = $item.Definition
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
108
        }
Open commit View diff
108 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
109
Open commit View diff
109
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
110
        [pscustomobject]@{
Open commit View diff
110 [pscustomobject]@{
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
111
            CommandType = $item.CommandType
Open commit View diff
111 CommandType = $item.CommandType
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
112
            Name        = $item.Name
Open commit View diff
112 Name = $item.Name
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
113
            Location    = $location
Open commit View diff
113 Location = $location
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
114
        }
Open commit View diff
114 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
115
    }
Open commit View diff
115 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
116
}
Open commit View diff
116 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
117
Open commit View diff
117
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
118
function Get-ListeningPorts {
Open commit View diff
118 function Get-ListeningPorts {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
119
    $connections = Get-NetTCPConnection -State Listen -ErrorAction Stop |
Open commit View diff
119 $connections = Get-NetTCPConnection -State Listen -ErrorAction Stop |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
120
        Sort-Object LocalPort, LocalAddress
Open commit View diff
120 Sort-Object LocalPort, LocalAddress
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
121
Open commit View diff
121
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
122
    foreach ($connection in $connections) {
Open commit View diff
122 foreach ($connection in $connections) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
123
        $processName = '<unknown>'
Open commit View diff
123 $processName = '<unknown>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
124
Open commit View diff
124
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
125
        if ($connection.OwningProcess -eq 4) {
Open commit View diff
125 if ($connection.OwningProcess -eq 4) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
126
            $processName = 'System'
Open commit View diff
126 $processName = 'System'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
127
        }
Open commit View diff
127 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
128
        else {
Open commit View diff
128 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
129
            try {
Open commit View diff
129 try {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
130
                $processName = (Get-Process -Id $connection.OwningProcess -ErrorAction Stop).ProcessName
Open commit View diff
130 $processName = (Get-Process -Id $connection.OwningProcess -ErrorAction Stop).ProcessName
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
131
            }
Open commit View diff
131 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
132
            catch {
Open commit View diff
132 catch {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
133
                $processName = '<unavailable>'
Open commit View diff
133 $processName = '<unavailable>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
134
            }
Open commit View diff
134 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
135
        }
Open commit View diff
135 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
136
Open commit View diff
136
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
137
        [pscustomobject]@{
Open commit View diff
137 [pscustomobject]@{
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
138
            Protocol = 'TCP'
Open commit View diff
138 Protocol = 'TCP'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
139
            Address  = $connection.LocalAddress
Open commit View diff
139 Address = $connection.LocalAddress
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
140
            Port     = $connection.LocalPort
Open commit View diff
140 Port = $connection.LocalPort
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
141
            PID      = $connection.OwningProcess
Open commit View diff
141 PID = $connection.OwningProcess
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
142
            Process  = $processName
Open commit View diff
142 Process = $processName
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
143
        }
Open commit View diff
143 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
144
    }
Open commit View diff
144 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
145
}
Open commit View diff
145 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
146
Open commit View diff
146
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
147
function Invoke-Ports {
Open commit View diff
147 function Invoke-Ports {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
148
    Get-ListeningPorts | Format-Table -AutoSize
Open commit View diff
148 Get-ListeningPorts | Format-Table -AutoSize
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
149
}
Open commit View diff
149 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
150
Open commit View diff
150
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
151
function Invoke-KillPort {
Open commit View diff
151 function Invoke-KillPort {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
152
    param([string[]]$Args)
Open commit View diff
152 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
153
Open commit View diff
153
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
154
    if ($Args.Count -lt 1) {
Open commit View diff
154 if ($Args.Count -lt 1) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
155
        throw 'Usage: killport <port> [--force]'
Open commit View diff
155 throw 'Usage: killport <port> [--force]'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
156
    }
Open commit View diff
156 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
157
Open commit View diff
157
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
158
    $port = 0
Open commit View diff
158 $port = 0
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
159
    if (-not [int]::TryParse($Args[0], [ref]$port) -or $port -lt 1 -or $port -gt 65535) {
Open commit View diff
159 if (-not [int]::TryParse($Args[0], [ref]$port) -or $port -lt 1 -or $port -gt 65535) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
160
        throw "Invalid port: $($Args[0])"
Open commit View diff
160 throw "Invalid port: $($Args[0])"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
161
    }
Open commit View diff
161 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
162
Open commit View diff
162
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
163
    $force = $Args -contains '--force'
Open commit View diff
163 $force = $Args -contains '--force'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
164
    $connections = Get-NetTCPConnection -State Listen -LocalPort $port -ErrorAction SilentlyContinue
Open commit View diff
164 $connections = Get-NetTCPConnection -State Listen -LocalPort $port -ErrorAction SilentlyContinue
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
165
    $processIds = @($connections | Select-Object -ExpandProperty OwningProcess -Unique)
Open commit View diff
165 $processIds = @($connections | Select-Object -ExpandProperty OwningProcess -Unique)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
166
Open commit View diff
166
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
167
    if ($processIds.Count -eq 0) {
Open commit View diff
167 if ($processIds.Count -eq 0) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
168
        throw "Nothing is listening on port $port."
Open commit View diff
168 throw "Nothing is listening on port $port."
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
169
    }
Open commit View diff
169 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
170
Open commit View diff
170
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
171
    $targets = foreach ($processId in $processIds) {
Open commit View diff
171 $targets = foreach ($processId in $processIds) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
172
        $name = '<unknown>'
Open commit View diff
172 $name = '<unknown>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
173
        try {
Open commit View diff
173 try {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
174
            $name = (Get-Process -Id $processId -ErrorAction Stop).ProcessName
Open commit View diff
174 $name = (Get-Process -Id $processId -ErrorAction Stop).ProcessName
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
175
        }
Open commit View diff
175 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
176
        catch {
Open commit View diff
176 catch {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
177
            $name = '<unavailable>'
Open commit View diff
177 $name = '<unavailable>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
178
        }
Open commit View diff
178 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
179
Open commit View diff
179
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
180
        [pscustomobject]@{
Open commit View diff
180 [pscustomobject]@{
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
181
            Port    = $port
Open commit View diff
181 Port = $port
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
182
            PID     = $processId
Open commit View diff
182 PID = $processId
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
183
            Process = $name
Open commit View diff
183 Process = $name
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
184
        }
Open commit View diff
184 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
185
    }
Open commit View diff
185 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
186
Open commit View diff
186
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
187
    $targets | Format-Table -AutoSize
Open commit View diff
187 $targets | Format-Table -AutoSize
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
188
Open commit View diff
188
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
189
    $protected = @($targets | Where-Object { $_.PID -in 0, 4 })
Open commit View diff
189 $protected = @($targets | Where-Object { $_.PID -in 0, 4 })
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
190
    if ($protected.Count -gt 0) {
Open commit View diff
190 if ($protected.Count -gt 0) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
191
        throw 'Refusing to terminate a protected Windows system process.'
Open commit View diff
191 throw 'Refusing to terminate a protected Windows system process.'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
192
    }
Open commit View diff
192 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
193
Open commit View diff
193
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
194
    if (-not $force) {
Open commit View diff
194 if (-not $force) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
195
        $answer = Read-Host "Terminate the process owning port $port? [y/N]"
Open commit View diff
195 $answer = Read-Host "Terminate the process owning port $port? [y/N]"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
196
        if ($answer -notmatch '^(y|yes)$') {
Open commit View diff
196 if ($answer -notmatch '^(y|yes)$') {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
197
            Write-Host 'Cancelled.'
Open commit View diff
197 Write-Host 'Cancelled.'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
198
            return
Open commit View diff
198 return
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
199
        }
Open commit View diff
199 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
200
    }
Open commit View diff
200 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
201
Open commit View diff
201
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
202
    foreach ($target in $targets) {
Open commit View diff
202 foreach ($target in $targets) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
203
        Stop-Process -Id $target.PID -Force -ErrorAction Stop
Open commit View diff
203 Stop-Process -Id $target.PID -Force -ErrorAction Stop
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
204
        Write-Host "Stopped $($target.Process) (PID $($target.PID))."
Open commit View diff
204 Write-Host "Stopped $($target.Process) (PID $($target.PID))."
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
205
    }
Open commit View diff
205 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
206
}
Open commit View diff
206 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
207
Open commit View diff
207
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
208
function Invoke-Sha256 {
Open commit View diff
208 function Invoke-Sha256 {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
209
    param([string[]]$Args)
Open commit View diff
209 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
210
Open commit View diff
210
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
211
    if ($Args.Count -lt 1) {
Open commit View diff
211 if ($Args.Count -lt 1) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
212
        throw 'Usage: sha256 <file>'
Open commit View diff
212 throw 'Usage: sha256 <file>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
213
    }
Open commit View diff
213 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
214
Open commit View diff
214
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
215
    $target = Resolve-MSOpenPath -Path $Args[0]
Open commit View diff
215 $target = Resolve-MSOpenPath -Path $Args[0]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
216
Open commit View diff
216
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
217
    if (-not (Test-Path -LiteralPath $target -PathType Leaf)) {
Open commit View diff
217 if (-not (Test-Path -LiteralPath $target -PathType Leaf)) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
218
        throw "Not a file: $target"
Open commit View diff
218 throw "Not a file: $target"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
219
    }
Open commit View diff
219 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
220
Open commit View diff
220
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
221
    $hash = Get-FileHash -LiteralPath $target -Algorithm SHA256
Open commit View diff
221 $hash = Get-FileHash -LiteralPath $target -Algorithm SHA256
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
222
    Write-Output "$($hash.Hash.ToLowerInvariant())  $target"
Open commit View diff
222 Write-Output "$($hash.Hash.ToLowerInvariant()) $target"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
223
}
Open commit View diff
223 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
224
Open commit View diff
224
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
225
function Invoke-Pbcopy {
Open commit View diff
225 function Invoke-Pbcopy {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
226
    param([string[]]$Args)
Open commit View diff
226 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
227
Open commit View diff
227
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
228
    $text = if ($Args.Count -gt 0) {
Open commit View diff
228 $text = if ($Args.Count -gt 0) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
229
        $Args -join ' '
Open commit View diff
229 $Args -join ' '
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
230
    }
Open commit View diff
230 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
231
    elseif ([Console]::IsInputRedirected) {
Open commit View diff
231 elseif ([Console]::IsInputRedirected) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
232
        [Console]::In.ReadToEnd()
Open commit View diff
232 [Console]::In.ReadToEnd()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
233
    }
Open commit View diff
233 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
234
    else {
Open commit View diff
234 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
235
        ''
Open commit View diff
235 ''
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
236
    }
Open commit View diff
236 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
237
Open commit View diff
237
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
238
    Set-Clipboard -Value $text
Open commit View diff
238 Set-Clipboard -Value $text
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
239
}
Open commit View diff
239 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
240
Open commit View diff
240
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
241
function Invoke-Pbpaste {
Open commit View diff
241 function Invoke-Pbpaste {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
242
    $value = Get-Clipboard -Raw
Open commit View diff
242 $value = Get-Clipboard -Raw
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
243
    if ($null -ne $value) {
Open commit View diff
243 if ($null -ne $value) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
244
        [Console]::Out.Write($value)
Open commit View diff
244 [Console]::Out.Write($value)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
245
    }
Open commit View diff
245 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
246
}
Open commit View diff
246 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
247
Open commit View diff
247
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
248
function Get-MimeType {
Open commit View diff
248 function Get-MimeType {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
249
    param([string]$Path)
Open commit View diff
249 param([string]$Path)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
250
Open commit View diff
250
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
251
    switch ([IO.Path]::GetExtension($Path).ToLowerInvariant()) {
Open commit View diff
251 switch ([IO.Path]::GetExtension($Path).ToLowerInvariant()) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
252
        '.html' { 'text/html; charset=utf-8' }
Open commit View diff
252 '.html' { 'text/html; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
253
        '.htm'  { 'text/html; charset=utf-8' }
Open commit View diff
253 '.htm' { 'text/html; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
254
        '.css'  { 'text/css; charset=utf-8' }
Open commit View diff
254 '.css' { 'text/css; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
255
        '.js'   { 'text/javascript; charset=utf-8' }
Open commit View diff
255 '.js' { 'text/javascript; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
256
        '.json' { 'application/json; charset=utf-8' }
Open commit View diff
256 '.json' { 'application/json; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
257
        '.xml'  { 'application/xml; charset=utf-8' }
Open commit View diff
257 '.xml' { 'application/xml; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
258
        '.txt'  { 'text/plain; charset=utf-8' }
Open commit View diff
258 '.txt' { 'text/plain; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
259
        '.md'   { 'text/markdown; charset=utf-8' }
Open commit View diff
259 '.md' { 'text/markdown; charset=utf-8' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
260
        '.svg'  { 'image/svg+xml' }
Open commit View diff
260 '.svg' { 'image/svg+xml' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
261
        '.png'  { 'image/png' }
Open commit View diff
261 '.png' { 'image/png' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
262
        '.jpg'  { 'image/jpeg' }
Open commit View diff
262 '.jpg' { 'image/jpeg' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
263
        '.jpeg' { 'image/jpeg' }
Open commit View diff
263 '.jpeg' { 'image/jpeg' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
264
        '.gif'  { 'image/gif' }
Open commit View diff
264 '.gif' { 'image/gif' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
265
        '.webp' { 'image/webp' }
Open commit View diff
265 '.webp' { 'image/webp' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
266
        '.ico'  { 'image/x-icon' }
Open commit View diff
266 '.ico' { 'image/x-icon' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
267
        '.pdf'  { 'application/pdf' }
Open commit View diff
267 '.pdf' { 'application/pdf' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
268
        '.wasm' { 'application/wasm' }
Open commit View diff
268 '.wasm' { 'application/wasm' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
269
        '.zip'  { 'application/zip' }
Open commit View diff
269 '.zip' { 'application/zip' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
270
        default { 'application/octet-stream' }
Open commit View diff
270 default { 'application/octet-stream' }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
271
    }
Open commit View diff
271 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
272
}
Open commit View diff
272 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
273
Open commit View diff
273
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
274
function Send-TextResponse {
Open commit View diff
274 function Send-TextResponse {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
275
    param(
Open commit View diff
275 param(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
276
        [Parameter(Mandatory)]
Open commit View diff
276 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
277
        [System.Net.HttpListenerResponse]$Response,
Open commit View diff
277 [System.Net.HttpListenerResponse]$Response,
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
278
Open commit View diff
278
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
279
        [Parameter(Mandatory)]
Open commit View diff
279 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
280
        [int]$StatusCode,
Open commit View diff
280 [int]$StatusCode,
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
281
Open commit View diff
281
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
282
        [Parameter(Mandatory)]
Open commit View diff
282 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
283
        [string]$Text,
Open commit View diff
283 [string]$Text,
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
284
Open commit View diff
284
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
285
        [string]$ContentType = 'text/plain; charset=utf-8'
Open commit View diff
285 [string]$ContentType = 'text/plain; charset=utf-8'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
286
    )
Open commit View diff
286 )
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
287
Open commit View diff
287
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
288
    $bytes = [Text.Encoding]::UTF8.GetBytes($Text)
Open commit View diff
288 $bytes = [Text.Encoding]::UTF8.GetBytes($Text)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
289
    $Response.StatusCode = $StatusCode
Open commit View diff
289 $Response.StatusCode = $StatusCode
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
290
    $Response.ContentType = $ContentType
Open commit View diff
290 $Response.ContentType = $ContentType
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
291
    $Response.ContentLength64 = $bytes.Length
Open commit View diff
291 $Response.ContentLength64 = $bytes.Length
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
292
    $Response.OutputStream.Write($bytes, 0, $bytes.Length)
Open commit View diff
292 $Response.OutputStream.Write($bytes, 0, $bytes.Length)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
293
}
Open commit View diff
293 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
294
Open commit View diff
294
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
295
function Get-DirectoryListingHtml {
Open commit View diff
295 function Get-DirectoryListingHtml {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
296
    param(
Open commit View diff
296 param(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
297
        [Parameter(Mandatory)]
Open commit View diff
297 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
298
        [string]$Directory,
Open commit View diff
298 [string]$Directory,
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
299
Open commit View diff
299
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
300
        [Parameter(Mandatory)]
Open commit View diff
300 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
301
        [string]$RequestPath
Open commit View diff
301 [string]$RequestPath
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
302
    )
Open commit View diff
302 )
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
303
Open commit View diff
303
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
304
    $encodedTitle = [Net.WebUtility]::HtmlEncode("Index of $RequestPath")
Open commit View diff
304 $encodedTitle = [Net.WebUtility]::HtmlEncode("Index of $RequestPath")
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
305
    $builder = [Text.StringBuilder]::new()
Open commit View diff
305 $builder = [Text.StringBuilder]::new()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
306
Open commit View diff
306
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
307
    [void]$builder.AppendLine('<!doctype html>')
Open commit View diff
307 [void]$builder.AppendLine('<!doctype html>')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
308
    [void]$builder.AppendLine('<html lang="en"><head><meta charset="utf-8">')
Open commit View diff
308 [void]$builder.AppendLine('<html lang="en"><head><meta charset="utf-8">')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
309
    [void]$builder.AppendLine("<title>$encodedTitle</title>")
Open commit View diff
309 [void]$builder.AppendLine("<title>$encodedTitle</title>")
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
310
    [void]$builder.AppendLine('<style>body{font-family:system-ui,sans-serif;max-width:900px;margin:40px auto;padding:0 20px}li{margin:8px 0}a{text-decoration:none}a:hover{text-decoration:underline}</style>')
Open commit View diff
310 [void]$builder.AppendLine('<style>body{font-family:system-ui,sans-serif;max-width:900px;margin:40px auto;padding:0 20px}li{margin:8px 0}a{text-decoration:none}a:hover{text-decoration:underline}</style>')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
311
    [void]$builder.AppendLine('</head><body>')
Open commit View diff
311 [void]$builder.AppendLine('</head><body>')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
312
    [void]$builder.AppendLine("<h1>$encodedTitle</h1><ul>")
Open commit View diff
312 [void]$builder.AppendLine("<h1>$encodedTitle</h1><ul>")
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
313
Open commit View diff
313
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
314
    if ($RequestPath -ne '/') {
Open commit View diff
314 if ($RequestPath -ne '/') {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
315
        [void]$builder.AppendLine('<li><a href="../">../</a></li>')
Open commit View diff
315 [void]$builder.AppendLine('<li><a href="../">../</a></li>')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
316
    }
Open commit View diff
316 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
317
Open commit View diff
317
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
318
    foreach ($item in Get-ChildItem -LiteralPath $Directory | Sort-Object @{ Expression = { -not $_.PSIsContainer } }, Name) {
Open commit View diff
318 foreach ($item in Get-ChildItem -LiteralPath $Directory | Sort-Object @{ Expression = { -not $_.PSIsContainer } }, Name) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
319
        $displayName = $item.Name + $(if ($item.PSIsContainer) { '/' } else { '' })
Open commit View diff
319 $displayName = $item.Name + $(if ($item.PSIsContainer) { '/' } else { '' })
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
320
        $hrefName = [Uri]::EscapeDataString($item.Name) + $(if ($item.PSIsContainer) { '/' } else { '' })
Open commit View diff
320 $hrefName = [Uri]::EscapeDataString($item.Name) + $(if ($item.PSIsContainer) { '/' } else { '' })
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
321
        $encodedName = [Net.WebUtility]::HtmlEncode($displayName)
Open commit View diff
321 $encodedName = [Net.WebUtility]::HtmlEncode($displayName)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
322
        [void]$builder.AppendLine("<li><a href=`"$hrefName`">$encodedName</a></li>")
Open commit View diff
322 [void]$builder.AppendLine("<li><a href=`"$hrefName`">$encodedName</a></li>")
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
323
    }
Open commit View diff
323 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
324
Open commit View diff
324
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
325
    [void]$builder.AppendLine('</ul></body></html>')
Open commit View diff
325 [void]$builder.AppendLine('</ul></body></html>')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
326
    return $builder.ToString()
Open commit View diff
326 return $builder.ToString()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
327
}
Open commit View diff
327 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
328
Open commit View diff
328
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
329
function Invoke-Serve {
Open commit View diff
329 function Invoke-Serve {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
330
    param([string[]]$Args)
Open commit View diff
330 param([string[]]$Args)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
331
Open commit View diff
331
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
332
    $port = 8000
Open commit View diff
332 $port = 8000
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
333
    if ($Args.Count -gt 0) {
Open commit View diff
333 if ($Args.Count -gt 0) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
334
        if (-not [int]::TryParse($Args[0], [ref]$port) -or $port -lt 1 -or $port -gt 65535) {
Open commit View diff
334 if (-not [int]::TryParse($Args[0], [ref]$port) -or $port -lt 1 -or $port -gt 65535) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
335
            throw "Invalid port: $($Args[0])"
Open commit View diff
335 throw "Invalid port: $($Args[0])"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
336
        }
Open commit View diff
336 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
337
    }
Open commit View diff
337 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
338
Open commit View diff
338
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
339
    $root = [IO.Path]::GetFullPath((Get-Location).Path)
Open commit View diff
339 $root = [IO.Path]::GetFullPath((Get-Location).Path)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
340
    $rootWithSeparator = $root.TrimEnd('\') + '\'
Open commit View diff
340 $rootWithSeparator = $root.TrimEnd('\') + '\'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
341
    $prefix = "http://127.0.0.1:$port/"
Open commit View diff
341 $prefix = "http://127.0.0.1:$port/"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
342
    $listener = [System.Net.HttpListener]::new()
Open commit View diff
342 $listener = [System.Net.HttpListener]::new()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
343
    $listener.Prefixes.Add($prefix)
Open commit View diff
343 $listener.Prefixes.Add($prefix)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
344
Open commit View diff
344
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
345
    try {
Open commit View diff
345 try {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
346
        $listener.Start()
Open commit View diff
346 $listener.Start()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
347
        Write-Host "Serving $root"
Open commit View diff
347 Write-Host "Serving $root"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
348
        Write-Host $prefix
Open commit View diff
348 Write-Host $prefix
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
349
        Write-Host 'Press Ctrl+C to stop.'
Open commit View diff
349 Write-Host 'Press Ctrl+C to stop.'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
350
Open commit View diff
350
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
351
        while ($listener.IsListening) {
Open commit View diff
351 while ($listener.IsListening) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
352
            $context = $listener.GetContext()
Open commit View diff
352 $context = $listener.GetContext()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
353
            $response = $context.Response
Open commit View diff
353 $response = $context.Response
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
354
Open commit View diff
354
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
355
            try {
Open commit View diff
355 try {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
356
                $requestPath = [Uri]::UnescapeDataString($context.Request.Url.AbsolutePath)
Open commit View diff
356 $requestPath = [Uri]::UnescapeDataString($context.Request.Url.AbsolutePath)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
357
                $relativePath = $requestPath.TrimStart('/').Replace('/', '\')
Open commit View diff
357 $relativePath = $requestPath.TrimStart('/').Replace('/', '\')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
358
                $candidate = [IO.Path]::GetFullPath((Join-Path $root $relativePath))
Open commit View diff
358 $candidate = [IO.Path]::GetFullPath((Join-Path $root $relativePath))
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
359
Open commit View diff
359
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
360
                $insideRoot = $candidate.Equals($root, [StringComparison]::OrdinalIgnoreCase) -or
Open commit View diff
360 $insideRoot = $candidate.Equals($root, [StringComparison]::OrdinalIgnoreCase) -or
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
361
                    $candidate.StartsWith($rootWithSeparator, [StringComparison]::OrdinalIgnoreCase)
Open commit View diff
361 $candidate.StartsWith($rootWithSeparator, [StringComparison]::OrdinalIgnoreCase)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
362
Open commit View diff
362
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
363
                if (-not $insideRoot) {
Open commit View diff
363 if (-not $insideRoot) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
364
                    Send-TextResponse -Response $response -StatusCode 403 -Text 'Forbidden'
Open commit View diff
364 Send-TextResponse -Response $response -StatusCode 403 -Text 'Forbidden'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
365
                    continue
Open commit View diff
365 continue
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
366
                }
Open commit View diff
366 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
367
Open commit View diff
367
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
368
                if (Test-Path -LiteralPath $candidate -PathType Container) {
Open commit View diff
368 if (Test-Path -LiteralPath $candidate -PathType Container) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
369
                    $indexFile = @('index.html', 'index.htm') |
Open commit View diff
369 $indexFile = @('index.html', 'index.htm') |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
370
                        ForEach-Object { Join-Path $candidate $_ } |
Open commit View diff
370 ForEach-Object { Join-Path $candidate $_ } |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
371
                        Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } |
Open commit View diff
371 Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
372
                        Select-Object -First 1
Open commit View diff
372 Select-Object -First 1
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
373
Open commit View diff
373
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
374
                    if ($indexFile) {
Open commit View diff
374 if ($indexFile) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
375
                        $candidate = $indexFile
Open commit View diff
375 $candidate = $indexFile
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
376
                    }
Open commit View diff
376 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
377
                    else {
Open commit View diff
377 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
378
                        $html = Get-DirectoryListingHtml -Directory $candidate -RequestPath $requestPath
Open commit View diff
378 $html = Get-DirectoryListingHtml -Directory $candidate -RequestPath $requestPath
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
379
                        Send-TextResponse -Response $response -StatusCode 200 -Text $html -ContentType 'text/html; charset=utf-8'
Open commit View diff
379 Send-TextResponse -Response $response -StatusCode 200 -Text $html -ContentType 'text/html; charset=utf-8'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
380
                        continue
Open commit View diff
380 continue
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
381
                    }
Open commit View diff
381 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
382
                }
Open commit View diff
382 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
383
Open commit View diff
383
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
384
                if (-not (Test-Path -LiteralPath $candidate -PathType Leaf)) {
Open commit View diff
384 if (-not (Test-Path -LiteralPath $candidate -PathType Leaf)) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
385
                    Send-TextResponse -Response $response -StatusCode 404 -Text 'Not found'
Open commit View diff
385 Send-TextResponse -Response $response -StatusCode 404 -Text 'Not found'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
386
                    continue
Open commit View diff
386 continue
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
387
                }
Open commit View diff
387 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
388
Open commit View diff
388
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
389
                $fileInfo = Get-Item -LiteralPath $candidate
Open commit View diff
389 $fileInfo = Get-Item -LiteralPath $candidate
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
390
                $response.StatusCode = 200
Open commit View diff
390 $response.StatusCode = 200
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
391
                $response.ContentType = Get-MimeType -Path $candidate
Open commit View diff
391 $response.ContentType = Get-MimeType -Path $candidate
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
392
                $response.ContentLength64 = $fileInfo.Length
Open commit View diff
392 $response.ContentLength64 = $fileInfo.Length
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
393
Open commit View diff
393
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
394
                $stream = [IO.File]::OpenRead($candidate)
Open commit View diff
394 $stream = [IO.File]::OpenRead($candidate)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
395
                try {
Open commit View diff
395 try {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
396
                    $stream.CopyTo($response.OutputStream)
Open commit View diff
396 $stream.CopyTo($response.OutputStream)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
397
                }
Open commit View diff
397 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
398
                finally {
Open commit View diff
398 finally {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
399
                    $stream.Dispose()
Open commit View diff
399 $stream.Dispose()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
400
                }
Open commit View diff
400 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
401
            }
Open commit View diff
401 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
402
            catch {
Open commit View diff
402 catch {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
403
                if ($response.OutputStream.CanWrite) {
Open commit View diff
403 if ($response.OutputStream.CanWrite) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
404
                    Send-TextResponse -Response $response -StatusCode 500 -Text 'Internal server error'
Open commit View diff
404 Send-TextResponse -Response $response -StatusCode 500 -Text 'Internal server error'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
405
                }
Open commit View diff
405 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
406
            }
Open commit View diff
406 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
407
            finally {
Open commit View diff
407 finally {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
408
                $response.OutputStream.Close()
Open commit View diff
408 $response.OutputStream.Close()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
409
            }
Open commit View diff
409 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
410
        }
Open commit View diff
410 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
411
    }
Open commit View diff
411 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
412
    finally {
Open commit View diff
412 finally {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
413
        if ($listener.IsListening) {
Open commit View diff
413 if ($listener.IsListening) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
414
            $listener.Stop()
Open commit View diff
414 $listener.Stop()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
415
        }
Open commit View diff
415 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
416
        $listener.Close()
Open commit View diff
416 $listener.Close()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
417
    }
Open commit View diff
417 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
418
}
Open commit View diff
418 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
419
Open commit View diff
419
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
420
function Show-Help {
Open commit View diff
420 function Show-Help {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
421
    @'
Open commit View diff
421 @'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
422
MS.Open commands
Open commit View diff
422 MS.Open commands
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
423
Open commit View diff
423
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
424
  open [path]          Open a folder, file, or URL
Open commit View diff
424 open [path] Open a folder, file, or URL
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
425
  reveal <path>        Show a file in Explorer
Open commit View diff
425 reveal <path> Show a file in Explorer
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
426
  copypath [path]      Copy a full path to the clipboard
Open commit View diff
426 copypath [path] Copy a full path to the clipboard
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
427
  which <command>      Explain which command will run
Open commit View diff
427 which <command> Explain which command will run
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
428
  paths                Print PATH entries one per row
Open commit View diff
428 paths Print PATH entries one per row
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
429
  serve [port]         Serve the current folder at 127.0.0.1
Open commit View diff
429 serve [port] Serve the current folder at 127.0.0.1
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
430
  ports                Show listening TCP ports
Open commit View diff
430 ports Show listening TCP ports
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
431
  killport <port>      Stop the process listening on a port
Open commit View diff
431 killport <port> Stop the process listening on a port
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
432
  sha256 <file>        Calculate a SHA-256 hash
Open commit View diff
432 sha256 <file> Calculate a SHA-256 hash
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
433
  pbcopy [text]        Copy arguments or piped input
Open commit View diff
433 pbcopy [text] Copy arguments or piped input
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
434
  pbpaste              Print clipboard text
Open commit View diff
434 pbpaste Print clipboard text
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
435
Open commit View diff
435
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
436
PowerShell functions installed separately:
Open commit View diff
436 PowerShell functions installed separately:
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
437
Open commit View diff
437
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
438
  mkcd <folder>        Create a directory and enter it
Open commit View diff
438 mkcd <folder> Create a directory and enter it
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
439
  reload               Reload the current PowerShell profile
Open commit View diff
439 reload Reload the current PowerShell profile
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
440
'@
Open commit View diff
440 '@
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
441
}
Open commit View diff
441 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
442
Open commit View diff
442
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
443
try {
Open commit View diff
443 try {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
444
    switch ($Command.ToLowerInvariant()) {
Open commit View diff
444 switch ($Command.ToLowerInvariant()) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
445
        'open'     { Invoke-Open -Args $Arguments }
Open commit View diff
445 'open' { Invoke-Open -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
446
        'reveal'   { Invoke-Reveal -Args $Arguments }
Open commit View diff
446 'reveal' { Invoke-Reveal -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
447
        'copypath' { Invoke-CopyPath -Args $Arguments }
Open commit View diff
447 'copypath' { Invoke-CopyPath -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
448
        'which'    { Invoke-Which -Args $Arguments }
Open commit View diff
448 'which' { Invoke-Which -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
449
        'paths'    { Invoke-Paths }
Open commit View diff
449 'paths' { Invoke-Paths }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
450
        'serve'    { Invoke-Serve -Args $Arguments }
Open commit View diff
450 'serve' { Invoke-Serve -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
451
        'ports'    { Invoke-Ports }
Open commit View diff
451 'ports' { Invoke-Ports }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
452
        'killport' { Invoke-KillPort -Args $Arguments }
Open commit View diff
452 'killport' { Invoke-KillPort -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
453
        'sha256'   { Invoke-Sha256 -Args $Arguments }
Open commit View diff
453 'sha256' { Invoke-Sha256 -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
454
        'pbcopy'   { Invoke-Pbcopy -Args $Arguments }
Open commit View diff
454 'pbcopy' { Invoke-Pbcopy -Args $Arguments }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
455
        'pbpaste'  { Invoke-Pbpaste }
Open commit View diff
455 'pbpaste' { Invoke-Pbpaste }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
456
        'help'     { Show-Help }
Open commit View diff
456 'help' { Show-Help }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
457
        '--help'   { Show-Help }
Open commit View diff
457 '--help' { Show-Help }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
458
        '-h'       { Show-Help }
Open commit View diff
458 '-h' { Show-Help }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
459
        default    { throw "Unknown command: $Command`n`n$(Show-Help)" }
Open commit View diff
459 default { throw "Unknown command: $Command`n`n$(Show-Help)" }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
460
    }
Open commit View diff
460 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
461
}
Open commit View diff
461 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
462
catch {
Open commit View diff
462 catch {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
463
    Write-Error $_.Exception.Message
Open commit View diff
463 Write-Error $_.Exception.Message
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
464
    exit 1
Open commit View diff
464 exit 1
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
465
}
Open commit View diff
465 }