Skip to content

Instantly share code, notes, and snippets.

@brettmillerb
Created October 14, 2019 09:34
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 brettmillerb/7820baaac215825671da63f1ac0d0526 to your computer and use it in GitHub Desktop.
Save brettmillerb/7820baaac215825671da63f1ac0d0526 to your computer and use it in GitHub Desktop.
function Get-RandomAdilioSticker {
[CmdletBinding()]
param ()
begin {
$results = irm -Uri 'https://api.github.com/repos/adilio/ps-design/git/trees/master?recursive=1'
}
process {
start ("{0}/{1}" -f 'https://raw.githubusercontent.com/adilio/ps-design/master', ($results.tree | ? path -match 'png$' | Get-Random | Select-Object -ExpandProperty path))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment