Skip to content

Instantly share code, notes, and snippets.

@Chirishman
Last active August 26, 2016 21:30
Show Gist options
  • Save Chirishman/7e545417e0e5adfac0182e7e98f50e77 to your computer and use it in GitHub Desktop.
Save Chirishman/7e545417e0e5adfac0182e7e98f50e77 to your computer and use it in GitHub Desktop.
$n="`n"
$l = @{
C=@({"I get knocked down,$((&$l.A)[0])ut I get up again$((&$l.A)[1])"},{"You are never gonna keep me down"})
V={"$(((("Whiskey","Vodka"),("Lager","Cider") | %{($_ | %{"He drinks a $_ drink"}) -join ", "}),(("good","best") | %{"He sings the songs that remind him of the $_ times"}) | %{$_}) -join $n)`n($(switch ($_) {2 {"Oh Danny Boy, Danny Boy, Danny Boy"}; 4 {"Don't cry for me, next door neighbor"}}))"}
A={if($lp -le 5){@(" b","")}else{@(" (we'll be singing)`nB","$(if($lp -gt 9){" (pissing the night away)"})")}}
}
$out = 1..20 | %{
$lp = $_
if ($_ -le 5){
if ($_ % 2 -eq 0){
& $l.V
}
else {
(1..4 | %{
($l.C|%{&$_})
}) -join "`n"
}
} else {
((($l.C|%{&$_}) -join "`n"),($(switch([int]($_ % 2 -eq 0)){0{"ooh)"};1{"when we're winning)"}}))) -join " ("
}
}
write-host ($out -join "`n`n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment