Created
June 20, 2013 00:19
-
-
Save metaskills/5819312 to your computer and use it in GitHub Desktop.
Short for `curl` content-length. I use this all the time, sometimes on my /assets/application.css to measure code bloat, if any.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl-cl () { | |
| local cl=$(curl -sI $1 | grep "Content-Length" | cut -d " " -f2) | |
| echo $cl | ruby -r 'action_pack' -e 'require "action_view" ; include ActionView::Helpers::NumberHelper ; puts number_to_human_size(STDIN.read.strip, precision:2, separator:",")' | |
| } |
Author
metaskills
commented
Jun 20, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment