I hereby claim:
- I am simontabor on github.
- I am simontabor (https://keybase.io/simontabor) on keybase.
- I have a public key whose fingerprint is 3AB5 32BF FA6D AE2B 6AA4 5AA2 48D0 7F18 B727 8097
To claim this, I am signing this object:
try { | |
// connecttime is the time taken for the user agent to establish a connection to the server. | |
var connecttime = window.performance.timing.connectEnd - window.performance.timing.connectStart; | |
console.log('Connect Time: '+connecttime+'ms'); | |
// responsetime is the time difference between recieving the first byte of data and the last byte from the server. | |
var responsetime = window.performance.timing.responseEnd - window.performance.timing.responseStart; | |
console.log('Response Time: '+responsetime+'ms'); | |
} | |
catch(e) { | |
// some complicated shit can go on here to get the details the hard way... probably |
if (!Modernizr.input.placeholder) { | |
$('input').each(function() { | |
if ((!($(this).val())) && ($(this).attr('placeholder'))) { | |
$(this).val($(this).attr('placeholder')); | |
$(this).attr('onclick','this.value = ""'); | |
} | |
}) | |
} |
$('header .expand').on('click',function() { | |
var h = $('header').toggleClass('expanded'); | |
var animate = { | |
'-webkit-transition':'height .2s ease-out', | |
'-moz-transition':'height .2s ease-out', | |
'transition':'height .2s ease-out' | |
}; | |
if (!h.hasClass('expanded')) { | |
h.css(animate).height(''); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dashboard integration example</title> | |
</head> | |
<body> | |
<div id="dashboard"></div> | |
<script> | |
var GS = { | |
dashboardContainer: '#dashboard', |
var MyRouter = Backbone.Router.extend({ | |
routes: { | |
// your routes | |
}, | |
initialize: function() { | |
// we must listen to all router events and track a pageview each time | |
this.on('all',function() { |
var mysql = require('mysql') | |
http = require('http'), | |
url = require('url'); | |
http.createServer(function (request, response) { | |
// Get the query | |
var query = url.parse(request.url, true).query.q; | |
mysql.query(query, function(e, r) { |
I hereby claim:
To claim this, I am signing this object:
var async = require('async'); | |
var Redis = require('redis'); | |
/* | |
* Rebalance a Redis cluster | |
* | |
* 1. Keeps slot allocations in blocks to maintain tidy configuration. | |
* 2. Moves slots to the coldest node from the hottest node, so the cluster stays healthy whilst rebalancing (`liveBalance`) | |
*/ |
[ { from: '11.11.12.71:6381', to: '11.11.12.70:6380', slot: 6553 }, | |
{ from: '11.11.12.72:6381', to: '11.11.12.71:6381', slot: 9829 }, | |
{ from: '11.11.12.72:6381', to: '11.11.12.70:6381', slot: 10922 }, | |
{ from: '11.11.12.71:6380', to: '11.11.12.72:6381', slot: 16383 }, | |
{ from: '11.11.12.70:6381', to: '11.11.12.72:6381', slot: 13321 }, | |
{ from: '11.11.12.72:6381', to: '11.11.12.70:6381', slot: 10921 }, | |
{ from: '11.11.12.70:6381', to: '11.11.12.72:6381', slot: 13109 }, | |
{ from: '11.11.12.72:6381', to: '11.11.12.70:6381', slot: 10920 }, | |
{ from: '11.11.12.70:6381', to: '11.11.12.72:6381', slot: 13110 }, | |
{ from: '11.11.12.72:6381', to: '11.11.12.70:6381', slot: 10919 }, |
<html> | |
<head> | |
<script src="//sslstatic.wix.com/services/js-sdk/1.43.0/js/wix.min.js"></script> | |
<script> | |
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push( | |
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0]; | |
d.src='//d1l6p2sc9645hc.cloudfront.net/tracker.js';q.parentNode. | |
insertBefore(d,q)}(window,document,'script','_gs'); | |
_gs('YOUR-SITE-TOKEN', false); |