Skip to content

Instantly share code, notes, and snippets.


Justin Perry ourmaninamsterdam

View GitHub Profile
ourmaninamsterdam / LICENSE
Last active Jan 25, 2022
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
yoavniran /
Last active Jan 23, 2022
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
mmcgahan / gist:9fa045d98c7c122f1c0b
Created Jun 18, 2014
Handlebars template inheritance
View gist:9fa045d98c7c122f1c0b
# Template composition with inclusion
Every template language I have seen provides some mechanism for one template to include another, thus supporting the reuse of repeated elements like headers and footers. The included templates are called partials in Mustache parlance:
<!-- home.hbs -->
{{> header}}
<p> HOME </p>
{{> footer}}
mattjburrows / Require JS global property module
Created Mar 4, 2014
Require JS module for getting / setting data required in multiple modules
View Require JS global property module
define(function() {
// Set the privately scoped object.
// Its properties are modified via the get / set methods returned from the module.
// We can keep values private by setting the 'private' part to true and set the 'value' part as the property value.
var helper = {
foo: {
'private': true,
'value': 'Private var'
classes: {
tomas-stefano /
Last active Jan 27, 2022
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
balupton /
Last active Jan 21, 2017
DocPad: Paging Solutions

DocPad: Paging Solutions

  • used for displaying prev and next page links on your current page (static site friendly)
  • used for displaying a content listing, that is split up onto multiple pages (requires dynamic site)
  • paged plugin used for splitting a document into a different pages, very neat (static site friendly)
k33g / kind.js
Created Apr 2, 2012
Re Use Object Model of BackBone
View kind.js
// Just do this : (and include backbone.js)
var Kind = function() {
this.initialize && this.initialize.apply(this, arguments);
Kind.extend = Backbone.Model.extend
var Thing = function() {};
Thing.extend = Backbone.Model.extend
mrdanadams / _pems.scss
Created Mar 29, 2012
PX to EMs conversion in Sass
View _pems.scss
/* See */
/* Default font size in pixels if not overridden. */
$baseFontSize: 16;
/* Convert PX units to EMs.
Ex: margin-right: pem(16);
@function pem($pxval, $base: $baseFontSize) {
@return #{$pxval / $base}em;