Skip to content

Instantly share code, notes, and snippets.

View rpalo's full-sized avatar

Ryan Palo rpalo

View GitHub Profile
@rpalo
rpalo / seven-die-five-die.ipynb
Last active June 6, 2018 16:12
Creating a fair five-sided die from a fair seven-sided die
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
PS> Get-Process | Where-Object WS -gt 150MB
# 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
PS> Get-Process | Select-Object Id, ProcessName -last 20
PS> Get-Process | Sort-Object CPU -descending | Select-Object ProcessName -first 10
PS> Get-Process | Sort-Object CPU -descending | Select-Object -first 10
function prompt {
$histCount = (Get-History | Measure-Object).count
return "POWERSHELL LEVEL OVER $histCount THOUSAND!!! >"
}
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"
~/Documents/blog
PS [102] master ->
PS> $profile