Skip to content

Instantly share code, notes, and snippets.

Orde Saunders decadecity

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am decadecity on github.
  • I am decadecity (https://keybase.io/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:

View budget.py
import MySQLdb
from pprint import pprint
db = MySQLdb.connect(
host="127.0.0.1",
user="[redacted]",
passwd="[redacted]",
db="httparchive"
)
@decadecity
decadecity / results.json
Created Mar 28, 2014
jQuery parse time data
View results.json
[
{
"jquery":"1.11.0",
"parse_time":23,
"browser":{
"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",
"browser":{
"name":"Chrome",
"version":"33.0.1750.146",
"major":"33"
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
decadecity / timer.html
Last active Dec 17, 2015
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>
<html>
<head>
<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>
</head>
<body>
<h1>Lorem ipsum</h1>
@decadecity
decadecity / cross-check.html
Created Nov 13, 2012
Categorizr cross-check data JSONifer
View cross-check.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Categorizr cross-check JSONifer
</head>
<body>
<script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0rc1/zepto.min.js "></script>
<script>
// This is VERY rough and ready and incredibly fragile.
@decadecity
decadecity / data_extract.py
Created Jul 29, 2012
Data processing script to calculate the relationship between request time and DOM load time.
View data_extract.py
#!/usr/bin/python
"""
Data processing script to calculate the relationship between request time and
DOM load time.
See: http://blog.decadecity.net/2012/09/15/how-long-does-an-http-request-take/
"""
import apachelog # https://code.google.com/p/apachelog/
import re
import urlparse
You can’t perform that action at this time.