Skip to content

Instantly share code, notes, and snippets.

@meatballhat
Created November 9, 2013 14:08
Show Gist options
  • Select an option

  • Save meatballhat/7385767 to your computer and use it in GitHub Desktop.

Select an option

Save meatballhat/7385767 to your computer and use it in GitHub Desktop.
li'l script or shell func thing to get a deterministic port number from <whatever>
#!/usr/bin/env ruby
puts (ARGV.first || '').scan(/./).map(&:ord).reduce(:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment