Last active
December 5, 2018 21:38
-
-
Save martinlindhe/d658db7d42ed0ecfc456bb8c8fe18511 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# powershell session init | |
# ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
Remove-Item Alias:wget | |
Remove-Item Alias:curl | |
del alias:diff -Force # force remove because its read-only | |
function Prompt { | |
# make prompt yellow | |
$promptString = "" + $(Get-Location) + ">" | |
Write-Host $promptString -NoNewline -ForegroundColor Yellow | |
return " " | |
} | |
$env:RUST_BACKTRACE = 1 | |
$env:EDITOR = "vim" | |
# msys2-paths for gtk-rs compilation with rust | |
$env:GTK_LIB_DIR = "C:\msys64\mingw64\lib" | |
$env:Path += ";C:\msys64\mingw64\bin" | |
function .. { cd ".." } | |
function ... { cd "..\.." } | |
function c { Clear } | |
function l { dir } | |
function cdgo { Set-Location ~\dev\go\src\github.com\martinlindhe } | |
function cdrs { Set-Location ~\dev\rs } | |
function cdhome { Set-Location ~\ } | |
function cddev { Set-Location ~\dev } | |
function sha256sum { | |
& "shasum" "-a" "256" $args | |
} | |
# make | |
function m { | |
make $args | |
} | |
# golang | |
function got { | |
& "go" "test" "-v" $args | |
} | |
function gota { | |
& "go" "test" "-v" "./..." $args | |
} | |
# rust | |
function cr { | |
& "cargo" "run" $args | |
} | |
function crr { | |
& "cargo" "run" "--release" $args | |
} | |
function cb { | |
& "cargo" "build" $args | |
} | |
function ct { | |
& "cargo" "test" "--" "--color" "always" "--nocapture" $args | |
} | |
function ctr { | |
& "cargo" "test" "--release" "--" "--color" "always" "--nocapture" $args | |
} | |
# misc | |
function psun { | |
& "ping" "-t" "ping.sunet.se" | |
} | |
function pbat { | |
& "ping" "-t" "battle" | |
} | |
function subl { | |
& "C:\Program Files\Sublime Text 3\subl.exe" $args | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment