Skip to content

Instantly share code, notes, and snippets.

@zenspider
Created May 20, 2025 23:07
Show Gist options
  • Save zenspider/e3afaf0d0670a4c4b191c86e84c14258 to your computer and use it in GitHub Desktop.
Save zenspider/e3afaf0d0670a4c4b191c86e84c14258 to your computer and use it in GitHub Desktop.
# which one do I hate least and why?
ban, = db.execute(<<~SQL, ip:, jail:, offset:) # parens, anti-seattle.rb style
ban, = db.execute <<~SQL, {ip:, jail:, offset:} # braces, same
ban, = db.execute <<~SQL, ip:, jail:, offset:offset # one value, to prevent hanging:
ban, = db.execute <<~SQL, ip:ip, jail:jail, offset:offset # consistent, but long
ban, = db.execute <<~SQL, ip:, jail:, offset:; # you monster version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment