Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am decadecity on github.
  • I am decadecity ( on keybase.
  • I have a public key whose fingerprint is 5CA2 0E6F 9F95 D922 2B94 D137 993D FB98 0DE7 E5FA

To claim this, I am signing this object:

import MySQLdb
from pprint import pprint
db = MySQLdb.connect(
decadecity / results.json
Created March 28, 2014 17:02
jQuery parse time data
View results.json
"ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/33.0.1750.146 Safari\/537.36",
decadecity / mixins.less
Last active November 15, 2016 19:30
Less mixins
View mixins.less
// Helper functions used throughout the code base.
// The old IE versions can cause the browser to hang so commented out.
#gradient {
.linear(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
background-color: @color;
background-image: -webkit-gradient(linear, left top, left top, color-stop(0, @start), color-stop(1, @stop));
background-image: -webkit-linear-gradient(@start, @stop);
background-image: -ms-linear-gradient(top, @start, @stop);
//filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@start,@stop)); // IE6 & IE7
decadecity / timer.html
Last active December 17, 2015 02:59
Example showing in page timers that can be used as a fall back when the Navigation Timing API is not available.
View timer.html
<!doctype html>
<script>window.t_pagestart = new Date().getTime();</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>In page timer example</title>
<h1>Lorem ipsum</h1>
decadecity / cross-check.html
Created November 13, 2012 11:30
Categorizr cross-check data JSONifer
View cross-check.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Categorizr cross-check JSONifer
<script src="// "></script>
// This is VERY rough and ready and incredibly fragile.
decadecity /
Created July 29, 2012 11:46
Data processing script to calculate the relationship between request time and DOM load time.
Data processing script to calculate the relationship between request time and
DOM load time.
import apachelog #
import re
import urlparse