Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> Get-Process | Where-Object WS -gt 150MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pwd | |
PS> Get-Location # or gl or pwd | |
# ls | |
PS> Get-ChildItem # or gci or dir or ls | |
# cd | |
PS> Set-Location # or sl or chdir or cd | |
# cp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> Get-Process | Select-Object Id, ProcessName -last 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> Get-Process | Sort-Object CPU -descending | Select-Object ProcessName -first 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> Get-Process | Sort-Object CPU -descending | Select-Object -first 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt { | |
$histCount = (Get-History | Measure-Object).count | |
return "POWERSHELL LEVEL OVER $histCount THOUSAND!!! >" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt { | |
$loc = (Get-Location).Path.Replace("$HOME", "~") | |
$gitBranch = git branch | Select-String "\*" | |
if (!$gitBranch) { | |
$gitBranch = "" | |
} else { | |
$gitBranch = $gitBranch.ToString().Replace("`* ", "") | |
} | |
$histCount = (Get-History | Measure-Object).count | |
Write-Host -ForegroundColor yellow "`n $loc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Documents/blog | |
PS [102] master -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> $profile |