Assuming you have Visual studio code installed and on the path. Assuming you have git installed and on the path.
- Open PowerShell.
- Edit your profile
code $profile
class Async<Wrapped> { | |
func map(function: @escaping (Wrapped) -> NewWrapped) -> Async<NewWrapped> { | |
// ... | |
} | |
// ... | |
} | |
typealias AsyncResult<Success, Failure> = Async<Result<Success, Failure>> |
defmodule Result do | |
@type t :: {:ok, any} | {:failure, any} | |
@spec map(Result.t, any :: any) :: Result.t | |
def map(result, mapping) do | |
case result do | |
{:ok, value} -> {:ok, mapping.(value)} | |
{:this_is_wrong, err} -> {:this_is_wrong, err} | |
end | |
end |
try { $null = gcm pshazz -ea stop; pshazz init } catch { } | |
function PromptAdmin { | |
$identity = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()) | |
$isAdmin = $identity.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
if ($isAdmin) { | |
Write-Host "ADMIN " -NoNewline -ForegroundColor Red | |
} | |
} |