Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Bailey matt-bailey

View GitHub Profile
@dbushell
dbushell / gist:5186122
Last active Dec 15, 2015
Grunt task to build HTML templates with includes (work in progress!)
View gist:5186122
/*!
*
* Copyright (c) David Bushell | @dbushell | http://dbushell.com/
*
*/
var fs = require("fs"),
path = require("path");
module.exports = function(grunt)
@dbushell
dbushell / htmlizr.js
Last active Dec 15, 2015
Grunt task to build HTML templates with includes (original version: https://gist.github.com/dbushell/5186122)
View htmlizr.js
/*!
*
* Copyright (c) David Bushell | @dbushell | http://dbushell.com/
*
*/
var fs = require("fs"),
path = require("path");
module.exports = function(grunt)
@tvdsluijs
tvdsluijs / pagination.html
Created Jul 11, 2018
Better pagination for Jekyll on Github pages, also see :
View pagination.html
{% 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 = paginator.page | minus: site.pagination_nr %}
{% assign page_end = paginator.page | plus: site.pagination_nr %}
@blackfalcon
blackfalcon / sassJunkDrawer.md
Last active May 15, 2019
Clean out your Sass junk-drawer
View sassJunkDrawer.md

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

View revised-font-stack.css
/*
A Revised Font Stack
from A Way Back
http://www.awayback.com/revised-font-stack/
*/
/*
@craigmdennis
craigmdennis / svgo.json
Last active Feb 20, 2020
SVGo Sketch Plugin Configuration
View svgo.json
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": true,
"indent": 2,
"floatPrecision": 3,
"plugins": [
{
"name": "removeDoctype",
"enabled": true
},
@demonbane
demonbane / makeapp.sh
Created Jul 5, 2011
Create a Fluid-style app launcher for single-window Chrome instances on OSX
View makeapp.sh
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
@necolas
necolas / README.md
Last active May 1, 2020
Experimenting with component-based HTML/CSS naming and patterns
View README.md

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
View mamp-to-valet.md

MAMP to Valet

One-time Dependency Setup/Configuration

Install Composer

wget https://getcomposer.org/download/1.1.0/composer.phar && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
@kevyworks
kevyworks / prep-ncv-env.sh
Last active Jun 18, 2020
Prepare Dev Machine for: Node Composer & Laravel Valet
View prep-ncv-env.sh
# MOJAVE: https://gist.github.com/kevmt/476716bfb0383d3fda699e4fcacc6470
# install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Terminal Aliases
echo "alias artisan='php $PWD/artisan'" >> ~/.bash_profile
echo "export NVM_DIR=~/.nvm" >> ~/.bash_profile
echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.bash_profile
You can’t perform that action at this time.