Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Last active December 18, 2015 13:09
Show Gist options
  • Save kenjiskywalker/5787448 to your computer and use it in GitHub Desktop.
Save kenjiskywalker/5787448 to your computer and use it in GitHub Desktop.
random
Earthquake.init do
command %r|^:rand\s+(.+)|, :as => :rand do |m|
str = m[1]
str_ary = str.split('')
strings = str_ary.sort_by{rand}.join('')
input(strings)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment