Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am tdhartwick on github.
  • I am thartwick (https://keybase.io/thartwick) on keybase.
  • I have a public key ASBof4CR0ZdPuXMB1dixf7mgLtSa8MZ5hQWWGZokyql0ogo

To claim this, I am signing this object:

@tdhartwick
tdhartwick / gulpfile.babel.js
Last active November 21, 2017 19:22
Sass lint Gulpfile
'use strict';
import plugins from 'gulp-load-plugins';
import yargs from 'yargs';
import browser from 'browser-sync';
import gulp from 'gulp';
import panini from 'panini';
import rimraf from 'rimraf';
import sherpa from 'style-sherpa';
import yaml from 'js-yaml';
@tdhartwick
tdhartwick / Gruntfile.js
Created June 1, 2017 18:09
Foundation 5 Gruntfile with Autoprefixer
module.exports = function(grunt) {
var hljs = require('highlight.js');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
csssplit: {
dist: {
src: ['dist/assets/css/app.css'],
dest: 'dist/assets/css/app.css',
options: {

Keybase proof

I hereby claim:

  • I am tdhartwick on github.
  • I am brah (https://keybase.io/brah) on keybase.
  • I have a public key ASDOagotZLETq9t1664yw7Vlmv43-DWIpa6mxGWCcg9_0Qo

To claim this, I am signing this object:

@tdhartwick
tdhartwick / Modal Re-instantiate Snippet
Created November 28, 2016 18:29
This will automatically open your modal and re-instantiate a modal when clicking the "x".
// Opens your Modal
$('** My Modal Class **').foundation('open');
// Re-instantiates Modal
$('** My Modal Class **').on('closed.zf.reveal', function() {
setTimeout(function() {
$('** My Modal Class **').foundation('open');
}, 100);
});
@tdhartwick
tdhartwick / dist-inky-browser.js
Created September 9, 2016 18:01
Pocket-sized Inky
!function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){var n,i=(t("cheerio"),t("../lib/inky"));if(window.setupInky=function(t,e){function r(e,r){var i=n.releaseTheKraken(e,t.cheerio);r(null,i)}t=t||{},t.cheerio=i.mergeCheerioOpts(t.cheerio),"undefined"==typeof n&&(n=new i(t)),e(r)},"undefined"!=typeof window){window.runInky=function(t,e){"undefined"==typeof e&&(e=t,t={}),window.setupInky(t,function(t){t(e.outerHTML,function(t,r){null===t?e.outerHTML=r:console.log(t)})})};for(var o=document.body.getElementsByTagName("container"),s=0;s<o.length;s++)window.runInky(o[s])}},{"../lib/inky":3,cheerio:10}],2:[function(t,e
@tdhartwick
tdhartwick / inky-browser.js
Created September 9, 2016 17:57
Snippet from Inky
var cheerio = require('cheerio');
var Inky = require('../lib/inky');
var inky;
window.setupInky = function(opts, cb) {
opts = opts || {};
opts.cheerio = Inky.mergeCheerioOpts(opts.cheerio);
if (typeof inky === 'undefined') {
inky = new Inky(opts);
{
//Custom Inky Snippets
"snippets": {
"html": {
"abbreviations": {
"row": "<row></row>",
"columns": "<columns small='12' large='12'></columns>",
"col": "<columns small='12' large='12'></columns>",
"container": "<container></container>",
"con": "<container></container>",
@tdhartwick
tdhartwick / Emmet.sublime-settings
Created March 23, 2016 17:49
Foundation For Emails Emmet Snippets
{
//Custom Inky Snippets
"snippets": {
"html": {
"abbreviations": {
"row": "<row></row>",
"columns": "<columns small='12' large='12'></columns>",
"col": "<columns small='12' large='12'></columns>",
"container": "<container></container>",
"con": "<container></container>",
<table class="row">
<tr>
<th class="large-6 small-8 columns"></th>
<th class="large-6 small-4 columns"></th>
</tr>
</table>