Skip to content

Instantly share code, notes, and snippets.

Ben New leftclickben

Block or report user

Report or block leftclickben

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
leftclickben / loadtest.js
Last active Dec 28, 2015
Simple website load tester written in Node.js
View loadtest.js
/*jslint node: true, white: true, nomen: true, plusplus: true*/
/*globals require: true, process: true*/
* Generic load tester
* Copyright (c) 2013
* MIT License, or whatever.
* Author assumes no liability for damage, loss, etc.
* Configuration is passed as a command-line argument when running node, e.g.
leftclickben / knockoutDateSelector
Last active Dec 24, 2015
Knockout date selector - use three `<select>` elements and compute a date, also restrict date within certain range
View knockoutDateSelector
<!doctype html>
<title>Knockout Date Selector</title>
<body style="background-color:#eee;font-family:sans-serif;">
<article style="width:600px;background-color:#fff;margin:1em auto;border:1px solid #000;padding:1em;">
<h1>Knockout Date Selector</h1>
leftclickben / testUnsort
Created Sep 6, 2013
Take an array of items and "unsort" them so that the items sharing similar properties are separated as much as possible. This code is not highly optimised and is not recommended for large data sets.
View testUnsort
// This is the input array.
$values = array(
'title' => 'First item (1,1)',
'categoryID' => 1,
'storeID' => 1
You can’t perform that action at this time.