Skip to content

Instantly share code, notes, and snippets.

@acdha
acdha / curl-ttfb.sh
Created November 28, 2011 23:03
Use curl to measure and report HTTP response times (pre-, start- and total transfer)
#!/bin/bash
#
# Report time to first byte for the provided URL using a cache buster to ensure
# that we're measuring full cold-cache performance
while (($#)); do
echo $1
curl -so /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" \
-w "%{http_code}\tPre-Transfer: %{time_pretransfer}\tStart Transfer: %{time_starttransfer}\tTotal: %{time_total}\tSize: %{size_download}\n" \
"$1?`date +%s`"
@mnot
mnot / kindle_my_rfc.sh
Created March 12, 2011 01:06
Quick and dirty way to get Internet-Drafts onto your kindle
#!/bin/sh
# Kindle My RFC (or Internet-Draft)
#
# Sends an Internet Draft to your kindle
# Invocation:
# > kindle_my_rfc [path/to/rfc2629-xml-file]
# > kindle_my_rfc [draft-name-with-number-00]
#
# Requires: