Skip to content

Instantly share code, notes, and snippets.

@thom-nic
thom-nic / _spacing-helpers.scss
Last active September 3, 2020 15:28 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .mts type helper classes.
/*
* Spacing helpers for consistent margin and padding on elements. Uses rems (not px!)
*
* With the current default settings, generates classes like:
* .mts = margin-top: 0.5rem
* .phl = padding-left: 2rem; padding-right: 2rem; // h = horizontal = left/right
*
* Inspired by:
* https://github.com/mrmrs/css-spacing
* https://getbootstrap.com/docs/4.0/utilities/spacing/
@thom-nic
thom-nic / jasmine.matcher.toBeInstanceOf.js
Last active December 4, 2015 19:29 — forked from heat/jasmine.matcher.toBeInstanceOf.js
Jasmine Matcher instanceof for Jasmine 2.3 & ES6
/* eslint-env jasmine */
beforeEach(function() {
jasmine.addMatchers({
toBeInstanceOf: (util, customEqualityTesters) => {
return {
compare: (actual, expected) => {
const pass = (actual instanceof expected);
return {
pass,
message: `Expected ${actual} to ${pass ? 'not' : ''} be instance of ${expected}`,
@thom-nic
thom-nic / osx-for-hackers.sh
Last active August 12, 2019 12:23 — forked from brandonb927/osx-for-hackers.sh
OSX environment setup
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'