Skip to content

Instantly share code, notes, and snippets.

View matt-bailey's full-sized avatar

Matt Bailey matt-bailey

  • GPMD
  • London, UK
View GitHub Profile
dbushell / gist:5186122
Last active December 15, 2015 02:19
Grunt task to build HTML templates with includes (work in progress!)
* Copyright (c) David Bushell | @dbushell |
var fs = require("fs"),
path = require("path");
module.exports = function(grunt)
dbushell / htmlizr.js
Last active December 15, 2015 20:19
Grunt task to build HTML templates with includes (original version:
* Copyright (c) David Bushell | @dbushell |
var fs = require("fs"),
path = require("path");
module.exports = function(grunt)
tvdsluijs / pagination.html
Created July 11, 2018 12:48
Better pagination for Jekyll on Github pages, also see :
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a class="ml-1 mr-2" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; {{site.str_previous_page}}</a>
{% else %}
<span>&laquo; {{site.str_previous_page}}</span>
{% endif %}
{% assign page_start = | minus: site.pagination_nr %}
{% assign page_end = | plus: site.pagination_nr %}
A Revised Font Stack
from A Way Back
blackfalcon /
Last active March 23, 2022 20:09
Clean out your Sass junk-drawer

by Dale Sande

CSS has had a long and sordid past. A developer never sets out with the goal of making a complete and total mess of things. Their intention is not to build something that is practically illegible, impractical to maintain and is limited in scale. But somehow, this is where many inevitably end up. Luckily, all is not lost. With some simple strategies, organizational methods and out-of-the box tools, we can really help get that junk-drawer inline.

For many of us getting started with Sass, at one time or another have created a junk-drawer of files. For most, this was a rookie mistake, but for others, this is a continuing issue with our architecture and file management techniques. Sass doesn't come with any real rules for file management so developers are pretty much left to their own devices.

Large CSS files and increased complexity

CSS started out with very simple intentions, but as [tableless web design][1.1] began to really take a foothold, o

kevyworks /
Last active April 14, 2022 15:54
Prepare Dev Machine for: Node Composer & Laravel Valet
# install brew
/usr/bin/ruby -e "$(curl -fsSL"
# Terminal Aliases
echo "alias artisan='php $PWD/artisan'" >> ~/.bash_profile
echo "export NVM_DIR=~/.nvm" >> ~/.bash_profile
echo "source $(brew --prefix nvm)/" >> ~/.bash_profile
aaemnnosttv /
Last active March 1, 2023 14:40
MAMP to Valet

MAMP to Valet

One-time Dependency Setup/Configuration

Install Composer

wget && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
craigmdennis / svgo.json
Last active May 16, 2023 16:46
SVGo Sketch Plugin Configuration
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <>",
"pretty": true,
"indent": 2,
"floatPrecision": 3,
"plugins": [
"name": "removeDoctype",
"enabled": true
bgrins /
Last active August 1, 2023 16:32
Prevent errors on console methods when no console present and expose a global 'log' function.

Javascript log Function

Every time I start a new project, I want to pull in a log function that allows the same functionality as the console.log, including the full functionality of the Console API.

There are a lot of ways to do this, but many are lacking. A common problem with wrapper functions is that the line number that shows up next to the log is the line number of the log function itself, not where log was invoked. There are also times where the arguments get logged in a way that isn't quite the same as the native function.

This is an attempt to once and for all document the function that I pull in to new projects. There are two different options:

  • The full version: Inspired by the plugin in HTML5 Boilerplate. Use this if you are writing an application and want to create a window.log function. Additionally,
demonbane /
Created July 5, 2011 20:05
Create a Fluid-style app launcher for single-window Chrome instances on OSX
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
echo "What is the url (e.g."
read inputline