Skip to content

Instantly share code, notes, and snippets.

View r8k's full-sized avatar

Rajiv Kilaparti r8k

  • Sydney, Australia
View GitHub Profile

Keybase proof

I hereby claim:

  • I am r8k on github.
  • I am r8k (https://keybase.io/r8k) on keybase.
  • I have a public key whose fingerprint is 06BC 9A29 0649 6618 44BF CA7B 9B64 C238 3BF2 7588

To claim this, I am signing this object:

@r8k
r8k / shortcuts.md
Created April 15, 2014 06:54 — forked from n1k0/shortcuts.md

Sublime Text 2 - Useful Shortcuts (Mac OS X)

Forked from here, but let's use Markdown.

General

  • ⌘T go to file
  • ⌘⌃P go to project
  • ⌘R go to methods
  • ⌃G go to line

Find longest request using CasperJS

This gist is based on this one.

// longest-request.js
var casper = require("casper").create();
var utils = require("utils");
var url = casper.cli.get(0);
var times = [];
#!/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`"