Skip to content

Instantly share code, notes, and snippets.

Chris Jamieson jamiesoncj

Block or report user

Report or block jamiesoncj

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
View gist:f595e77f9096a829a546

Some general reading and resources you may find helpful

When people ask me to give them advice about getting into startups, I direct them to these bits of writing.

There is loads of stuff out there which can help get an understanding of how "startups" are different from other service businesses, and how to approach trying to start one. Here are my top picks:

@jamiesoncj
jamiesoncj / Set image title attribute as caption
Last active Dec 25, 2016
Simple jQuery snippet to set the title attribute of an <img> as a caption
View Set image title attribute as caption
$(document).ready(function() {
$("img").each(function () {
var $this = $(this);
var title = $this.attr("title");
$this.after('<div class="caption">'+ title +'</div>');
});
});
@jamiesoncj
jamiesoncj / command.md
Last active Aug 27, 2016
Baseline meteor setup
View command.md

Handy packages for quickstart Meteor projects:

meteor add alanning:roles accounts-password aldeed:autoform aldeed:collection2 arillo:flow-router-helpers raix:handlebar-helpers fortawesome:fontawesome kadira:blaze-layout kadira:flow-router kevohagan:sweetalert matb33:collection-hooks momentjs:moment natestrauser:animate-css peppelg:bootstrap-3-modal reactive-var twbs:bootstrap useraccounts:flow-routing useraccounts:bootstrap utilities:avatar yogiben:autoform-modals yogiben:spinkit percolatestudio:segment.io@=2.0.0_1

Eslint setup: meteor npm install --save-dev babel-eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-meteor eslint-plugin-react eslint-plugin-jsx-a11y eslint-import-resolver-meteor eslint

View clerkenwell.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Abbey.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Abbey.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jamiesoncj
jamiesoncj / checklists.md
Created Jan 13, 2016
Overview of why checklists are great, and how to make good checklists
View checklists.md

Why use checklists?

According to Atul Gawande:

The primary aim of a checklist is to prevent human failure, either from ignorance (you don't know what you don't know) or ineptitude (knowledge is applied inconsistently or incorrectly).

The secondary aim of a checklist is to force people to talk to each other and foster teamwork. This is known as "activation phenomenon": giving people a chance to say something at the start of a procedure seems to activate their sense of participation and responsibility and their willingness to speak up.

What makes a good checklist?

  1. Define clear pause point at which the checklist is supposed to be used.
@jamiesoncj
jamiesoncj / Validate URL
Created Apr 30, 2013
Simple PHP snippet to validate a URL using preg_match
View Validate URL
<?php
function isValidURL($url){
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
}
// usage
if(!isValidURL($url)){
$message = 'Please enter a valid URL';
echo $message;
@jamiesoncj
jamiesoncj / Simple Equal Heights
Created Apr 28, 2013
Simple JavaScript / jQuery code to set equal heights to elements. Original snippet from Paul Irish
View Simple Equal Heights
/* equal heights */
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
$(window).load(function() {
$('#elementID, .elementClass').setAllToMaxHeight();
});
@jamiesoncj
jamiesoncj / integrations.md
Created Oct 7, 2015
Segment available integrations
View integrations.md

The following is a list of integrations available via Segment as at 7th Oct 2015

  • Facebook Conversions
  • Google Analytics
  • Google Tag Manager
  • GoSquared
  • Hello Bar
  • Intercom
  • Lucky Orange
  • MailChimp
You can’t perform that action at this time.