Skip to content

Instantly share code, notes, and snippets.

@stevedev
Created August 28, 2017 20:06
Show Gist options
  • Save stevedev/3c68217024d81c37b833f0c89f75fb6f to your computer and use it in GitHub Desktop.
Save stevedev/3c68217024d81c37b833f0c89f75fb6f to your computer and use it in GitHub Desktop.
Fish tank generator for slack. Because.
#!/usr/bin/ruby
# some fish!
fish = %w{ fish fish2 fish3 fish4 fish5 fish6 fish7 }
# At least 3 lines
lines = rand(4) + 3
output = ""
lines.times do
# At least 5 fish per line
fish_per_line = rand(6) + 5
fish_per_line.times do
selected_fish = fish.sample
space = " " * (rand(7) + 3)
output << "#{space}:#{selected_fish}:"
end
output += "\n"
end
# write to pbcopy
IO.popen('pbcopy', 'w') do |pbcopy|
pbcopy << output
end
@stevedev
Copy link
Author

Note... you'll need to add the fish emoticons for this to work.

@girasquid
Copy link

What about plants? 🤔

@girasquid
Copy link

And the coral emoji would be cool too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment