Hello, my name is John Su. Welcome to my homepage. I'm a senior technical director, technical artist, game engineer, VFX artist, and art-lover.
by John
Tried powershell once and you will fall in love with it.
Before trying: why on earth do we need another shell script language? After: Fuck it’s so .. powerful, for the following reasons:
ls.Here’s a simple picture preview app I wrote in Powershell:

It can display specified image in console, for example this is the original
image that it displayed:

the powershell snippet I wrote for it:
function Show-Image {
param (
[String] $Path
)
$bmp = [System.Drawing.Bitmap]::FromFile($Path)
foreach($y in 1..($bmp.height-1))
{
foreach($x in 1..($bmp.width-1)){
$pixel = $bmp.GetPixel($x, $y)
$value = ($pixel.R + $pixel.G + $pixel.B) * 1.3
if ($value -gt 768) {
$color = 'white'
} elseif ($value -gt 512) {
$color = 'gray'
} elseif ($value -gt 256) {
$color = 'darkgray'
} else {
$color = 'black'
}
Write-Host -BackgroundColor $color -NoNewline ' '
}
Write-Host ''
}
}