Skip to content

Instantly share code, notes, and snippets.

@mattbanks
mattbanks / php-expires-headers.php
Created August 15, 2013 13:29
PHP no caching expires headers
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
@mattbanks
mattbanks / mb_html5_doctype.php
Last active December 21, 2015 07:18
Adding Conditional Classes to the HTML Tag in Genesis 2.0
/**
* HTML5 DOCTYPE
* removes the default Genesis doctype, adds new html5 doctype with IE8 detection
*/
function mb_html5_doctype() {
?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="lt-ie9" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes( 'html' ); ?>> <!--<![endif]-->
@mattbanks
mattbanks / Gruntfile.js
Last active December 22, 2015 13:19
Grunt Setup with LESS
'use strict';
module.exports = function(grunt) {
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
@mattbanks
mattbanks / Gruntfile.js
Created September 9, 2013 16:05
Grunt LiveReload issue - package.json and Gruntfile.js
'use strict';
module.exports = function(grunt) {
// load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
@mattbanks
mattbanks / Vagrantfile
Created October 9, 2013 18:56
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.network :private_network, ip: "192.168.204.72"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 1024]
/* ==========================================================================
Grid
========================================================================== */
$pad: 20px;
.grid {
margin: 0 0 $pad 0;
@include clearfix();
}
@mattbanks
mattbanks / .hyper.js
Created May 10, 2017 13:34
Hyper config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@mattbanks
mattbanks / Contract Killer 3.md
Created March 7, 2016 01:50 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@mattbanks
mattbanks / .eslintrc
Created March 12, 2018 17:47
base eslintrc
{
"extends": [
"airbnb-base",
"prettier"
],
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"classes": true
}