Skip to content

Instantly share code, notes, and snippets.

@happysysadm
Created November 4, 2016 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happysysadm/696330fed6ce2b540c40fd0ae20c0e0e to your computer and use it in GitHub Desktop.
Save happysysadm/696330fed6ce2b540c40fd0ae20c0e0e to your computer and use it in GitHub Desktop.
PowerShell Oneliner Contest 2016 - my solutions
#happysysadm.com solution 1 - 63 chars
([char[]](71..89)|?{!(gdr $_)2>0}|sort{irm guid.it/api})[0]+':'
#happysysadm.com solution 2 - 61 chars
do{$x=[char]([random]@{}).Next(71,89)}while(gdr($x)2>0)$x+':'
#happysysadm.com solution 3 - 61 chars
''+(ls function:[g-y]:|sls(gdr)-n|sort{[guid]::NewGuid()})[0]
#happysysadm.com solution 4 - 59 chars
''+(ls function:[g-y]:|sls(gdr)-n|sort{irm guid.it/api})[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment