Skip to content

Instantly share code, notes, and snippets.

@lacostenycoder
Created August 13, 2019 21:40
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 lacostenycoder/959d396f67f3572c3dc4f967cad086ee to your computer and use it in GitHub Desktop.
Save lacostenycoder/959d396f67f3572c3dc4f967cad086ee to your computer and use it in GitHub Desktop.
Add ruby benchmark snippet to atom editor
# ~/.atom/snippets.cson
".source.ruby":
"Initialize":
prefix: "Benchmark"
body: "Benchmark.bm do |x|\n x.report(:a) {\t$1}\n x.report(:b) {\t$2}\nend"
@lacostenycoder
Copy link
Author

lacostenycoder commented Aug 13, 2019

I like to use Benchmark, but oddly forget this simple format because I don't use it enough. Now I don't have to look up docs anymore, I can just type Bench and tab autocomplete gives me the structure. This should be in atom core IMHO.

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