Skip to content

Instantly share code, notes, and snippets.

Adrian Rowbotham aderowbotham

Block or report user

Report or block aderowbotham

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
aderowbotham /
Last active Nov 2, 2015
Spreadsheet concatenation formulae

Spreadsheet concatenation formulae

These are tested in Open Office. May need modifying for Excel.

Combine multiple address fields into one

Contatenate cells B5 - F5, inserting a comma and line break, only if the cell is not blank


View distribute_integers.js
// distribute a large integer as evenly as possible between any number of integer positions
// inputs
var total = 6;
var parts = 5;
var fractionFloored = Math.floor(total/parts);
var mod = total % parts;
var output = [];
aderowbotham / boolean-radio.html
Created Mar 16, 2015
Use Radio buttons for a boolean with Angular 1.3
View boolean-radio.html
<h1>How to use radio buttons to represent a boolean?</h1>
<!-- It's important to use `ng-value` for the boolean value and not just `value` -->
<h3>Enable some setting?</h3>
<label><input type="radio" ng-model="myBoolean" ng-value="false"> Yes</label>
<label><input type="radio" ng-model="myBoolean" ng-value="true"> No</label>
aderowbotham /
Created Mar 5, 2015
Keybase proof of ID

Keybase proof

I hereby claim:

  • I am aderowbotham on github.
  • I am aderowbotham ( on keybase.
  • I have a public key whose fingerprint is 00C0 9F60 154C 2381 73D6 16D3 E7F4 1CEC 1EFA 15CD

To claim this, I am signing this object:

aderowbotham / angular-debounce-wrapper.html
Created Feb 13, 2015
Debounce function wrapped in an Angular service
View angular-debounce-wrapper.html
<!DOCTYPE html>
<html xmlns:ng="" xmlns:svg="">
<meta charset="utf-8" />
NOTE: Angular has a debounce directive built in as of AngularJS 1.3 in the form
of ng-model-options:
aderowbotham / pancake-simplify-menu.js
Created Nov 6, 2014
Hide items from the admin menu in Pancake (
View pancake-simplify-menu.js
// this works as of 6 Nov 2014, Pancake 4.6.10
// set the names of menu items you want to hide here (either the href or text content of each top-level link)
var itemsToHide = ["#proposals", "credit notes"];
$( document ).ready(function(){
// run again after Pancake's JS has run
setTimeout(hideMenuItems, 50);
aderowbotham /
Last active Aug 29, 2015
Getting started with Cordova

#Setting up a Cordova Project #####HMTL London, 2014-07-23

Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript

PhoneGap is Adobe's implementation of Cordova. PhoneGap also offers the PhoneGap Build service. This is not covered here.

View uploadify_footer.html
aderowbotham / mobile_not_implemented.css
Created Jul 3, 2013
mobile layout not implemented notification message (for sites in development)
View mobile_not_implemented.css
/* mobile
============================================================================================== */
@media screen and (min-width: 0) and (max-width: 700px) {
/* hide everything */
div, span, p
display: none;
body:before {
View gist:5559476
# Copied from
# Thanks to Kristian Lyngstøl / @KristianLyng for putting this together
Regular expression cheat sheet for Varnish
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX
regular expressions, for a complete guide, see: "man 7 regex"
Basic matching:
You can’t perform that action at this time.