Skip to content

Instantly share code, notes, and snippets.

/* ==========================================================================
Grid
========================================================================== */
$pad: 20px;
.grid {
margin: 0 0 $pad 0;
@include clearfix();
}
@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]
@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 / 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 / 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 / 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
?>
#!/usr/bin/env ruby
# 1. export your RIL bookmarks
# 2. save this file to the same directory where your ril_export.html is
# 3. change username and password in the script bellow
# 4. run 'ruby ril_to_instapaper.rb' in terminal
require "cgi"
require "net/http"
require "net/https"
@mattbanks
mattbanks / Gruntfile-js-issue.js
Created April 9, 2013 13:44
Gruntfile.js where JS is not soft refreshing with LiveReload - getting a hard refresh for JS changes in the compiled *.min.js files after run through uglify
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
compass: {
@mattbanks
mattbanks / installing.php
Created March 21, 2013 14:24
Run wp_install() as an output script in an Alfred 2 Workflow
<?php
$site = $_GET['q'];
$dir = "/Users/MYUSERNAME/Sites/$site";
$siteUrl = "http://sites.dev/$site";
$username = 'MYUSERNAME';
$email = 'MYEMAIL';
$password = 'MYPASSWORD';