Skip to content

Instantly share code, notes, and snippets.

View stowball's full-sized avatar

Matt Stow stowball

View GitHub Profile
@stowball
stowball / svg-loader.js
Created October 6, 2015 03:31
A lightweight, asynchronous SVG icon system loader
<script>
(function (url) {
var id = 'svg-sprite';
var container;
var xhr = new XMLHttpRequest();
var body = document.body;
if ('withCredentials' in xhr) {
xhr.withCredentials;
xhr.open('GET', url, true);
@stowball
stowball / SassMeister-input-HTML.html
Created October 7, 2015 05:17
Generated by SassMeister.com.
<div class="mosaic">
<div class="tile tile-1"></div>
<div class="tile tile-2"></div>
<div class="tile tile-3"></div>
<div class="tile tile-4"></div>
<div class="tile tile-5"></div>
<div class="tile tile-6"></div>
<div class="tile tile-7"></div>
<div class="tile tile-8"></div>
<div class="tile tile-9"></div>
@stowball
stowball / installation.md
Last active May 1, 2025 20:13
JIRA Toggle Filter

Installation instructions

  1. Change your JIRA domain on line 7
  2. Install with Greasmonkey for Firefox or Tampermonkey for Chrome

Ctrl+click to revert to the original behaviour

@stowball
stowball / sass.js
Created December 16, 2015 01:26
grunt-sass simplified node_modules imports
var path = require('path');
function importPaths(url, file, done) {
try {
var newPath = path.relative(path.dirname(file), require.resolve(url + '.scss'));
return done({ file: newPath })
} catch (e) {
return done({ file: url})
}
function equilibrium(numberArray) {
var lower, higher, equilibriums = [];
var lowerSum, higherSum;
function sum(arrayParts) {
return arrayParts.reduce(function (prev, curr) {
return prev + curr;
}, 0);
}
@stowball
stowball / must-have-apps.md
Last active October 16, 2022 06:54
Must have Mac apps

Must have Mac apps

Terminal

  • Go2Shell - don't install via the App Store! (no longer works since Catalina)
  • Iterm2

Clipboard Manager

@stowball
stowball / .bash_profile
Last active April 22, 2026 01:01
Mac dotfiles
export BASH_SILENCE_DEPRECATION_WARNING=1
source ~/.bashrc
#eval "$(/opt/homebrew/bin/brew shellenv)"
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
#export PATH="/usr/local/sbin:$PATH"
#export YARN_NPM_AUTH_TOKEN=""
#alias assume=". assume"
@stowball
stowball / twig.js
Created March 14, 2016 17:43
trying to get twig data to work
'use strict';
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
var twig = require('gulp-twig');
var data = require('gulp-data');
var getJsonData = function(file) {
@stowball
stowball / _em.scss
Last active April 12, 2016 01:50
A tiny little Sass function to convert a target and context to an em or unitless equivalent
@function em($target, $context, $unitless: false) {
$unit: if($unitless, 1, 1em);
@return strip-unit($target / $context) * $unit;
}
@stowball
stowball / gm-hide-twitter-moments-add-likes.js
Last active March 5, 2017 00:48
A Greasemonkey script to hide the Moments tab and a Likes tabs on twitter.com
// ==UserScript==
// @name Hide Twitter Moments and Add Likes
// @namespace http://mattstow.com/
// @version 0.2
// @description Hide Twitter Moments tab and a Likes tab
// @author Matt Stow
// @match https://twitter.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */