Skip to content

Instantly share code, notes, and snippets.

View aderowbotham's full-sized avatar
👽

Adrian Rowbotham aderowbotham

👽
View GitHub Profile
@aderowbotham
aderowbotham / cordova-setup.md
Last active August 29, 2015 14:04
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.

@aderowbotham
aderowbotham / pancake-simplify-menu.js
Created November 6, 2014 11:33
Hide items from the admin menu in Pancake (http://pancakeapp.com/)
// 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(){
hideMenuItems();
// run again after Pancake's JS has run
setTimeout(hideMenuItems, 50);
@aderowbotham
aderowbotham / angular-debounce-wrapper.html
Created February 13, 2015 21:27
Debounce function wrapped in an Angular service
<!DOCTYPE html>
<html xmlns:ng="http://angularjs.org" xmlns:svg="http://www.w3.org/2000/svg">
<head>
<meta charset="utf-8" />
<!--
NOTE: Angular has a debounce directive built in as of AngularJS 1.3 in the form
of ng-model-options: https://docs.angularjs.org/api/ng/directive/ngModelOptions
@aderowbotham
aderowbotham / keybase.md
Created March 5, 2015 15:44
Keybase proof of ID

Keybase proof

I hereby claim:

  • I am aderowbotham on github.
  • I am aderowbotham (https://keybase.io/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
aderowbotham / boolean-radio.html
Created March 16, 2015 18:25
Use Radio buttons for a boolean with Angular 1.3
<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
aderowbotham / distribute_integers.js
Created March 18, 2015 16:00
Distribute Integers
// 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
aderowbotham / pirata_associate_tech_director_2012-09.md
Created September 19, 2012 14:01
Pirata Job Specification: Associate Technical Director

#Pirata Logo

http://piratalondon.com | September 2012

##Associate Technical Director

We've got a brand new opening for a senior someone who can bring technical experience, client­facing skills and team leadership to the table. Pirata is changing as we branch out into exciting new types of work, and you will be expected to help us shape the technical team as we continue to make that transition.

A background in technical project management is something we're very keen on here, although we are also considering candidates with more of a hands­on development background. In either case it is expected that you will be familiar with a wide range of development languages, tools, platforms and content management systems.

@aderowbotham
aderowbotham / pirata_tech_lead_2012-09.md
Created September 19, 2012 14:04
Pirata Job Specification: Technical Lead

#Pirata Logo

http://piratalondon.com | September 2012

##Technical Lead

We're looking for a Technical Lead with a wealth of web or app development experience. You will be expected to show incredible attention to detail and be able to understand and solve problems in the context of the bigger picture.

You will be expected to show leadership qualities and be able to oversee small teams of developers across a range of projects. You'll also be required to communicate often complicated concepts to clients without blinding them with acronyms and jargon. You'll ideally have several years experience in back-end development preferably with Python / Django or one or more PHP frameworks or content management systems. You will get involved with hands-on development at times, though this will likely comprise less than a third of each working week.

@aderowbotham
aderowbotham / dev_tools.md
Last active October 13, 2015 21:20
Developers' Tools

##Developers’ Tools

I’ve created this list as a place to capture some of the handy tools that frequently get shared among developers.

Note: the category anchors were working yesterday, but seem to have stopped working today. GitHub is no longer rendering anchor tags at each header. If anyone knows of a solution let me know!

#####Categories

@aderowbotham
aderowbotham / spreadsheet-concatenate.md
Last active November 2, 2015 15:33
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

=IF(TRIM(LEN(B5));B5&amp;","&amp;CHAR(10);"")&amp;IF(TRIM(LEN(C5));C5&amp;","&amp;CHAR(10);"")&amp;IF(TRIM(LEN(D5));D5&amp;","&amp;CHAR(10);"")&amp;IF(TRIM(LEN(E5));E5&amp;","&amp;CHAR(10);"")&amp;IF(TRIM(LEN(F5));F5;"")