Skip to content

Instantly share code, notes, and snippets.

@baweaver
Created December 17, 2019 06:52
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 baweaver/5cd03d89c335a0263265fc36bbc8ef79 to your computer and use it in GitHub Desktop.
Save baweaver/5cd03d89c335a0263265fc36bbc8ef79 to your computer and use it in GitHub Desktop.
My spectacularly convoluted selection criteria
names = %w(
@OtherChrisPine @DaveAronson @mellowfish @ktcarrel18 @yvonesre @molbrwn @_MylesHigh_ @DoodlingDev @nilsding @mae701
)
totally_random_results = "Lemur fun!"
.chars
.map(&:ord)
.zip(names.shuffle.map(&:ord))
.sample
.sum
.*(Time.now.to_i / 100_000 / 418)
.times
.map { names.sample }
.tally
.sort_by(&:last)
.to_h
puts "...and the winner is: #{totally_random_results.first.first}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment