Skip to content

Instantly share code, notes, and snippets.

View daveredfern's full-sized avatar

Dave Redfern daveredfern

View GitHub Profile
@daveredfern
daveredfern / Default gulp file
Last active August 29, 2015 14:23
An example gulp file to compile sass, jshint javascript and optimise images
/*!
* gulp
* $npm init
* $ npm install gulp-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache gulp-sourcemaps del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
@daveredfern
daveredfern / gitignore
Created June 16, 2015 07:08
An example gitignore file for projects for Mac, Google Docs, server folders and random nasty files
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
.column {
width: calc(20% - 1rem);
}
@daveredfern
daveredfern / Example of using Calc with SASS variables
Created July 3, 2015 07:07
Example of using Calc with SASS variables
$spacing = 1rem;
.column {
width: calc(20% - #{$spacing});
}
@daveredfern
daveredfern / app etc config.php
Last active August 29, 2015 14:24
app etc config.php
<?php
return array (
'modules' => array(
...
'Magento_CurrencySymbol' => 1,
'Magento_Wishlist' => 1,
'Iweb_HelloWorld' => 1
/*
CSS Selector Generator, v1.2.0
by Riki Fridrich <[email protected]> (http://fczbkk.com)
https://github.com/fczbkk/css-selector-generator/
*/(function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};a=function(){function a(a){null==a&&(a={}),this.options={},this.setOptions(this.default_options),this.setOptions(a)}return a.prototype.default_options={selectors:["id","class","tag","nthchild"],prefix_tag:!1,attribute_blacklist:[],attribute_whitelist:[],quote_attribute_when_needed:!1,id_blacklist:[],class_blacklist:[]},a.prototype.setOptions=function(a){var b,c,d;null==a&&(a={}),c=[];for(b in a)d=a[b],this.default_options.hasOwnProperty(b)?c.push(this.options[b]=d):c.push(void 0);return c},a.prototype.isElement=function(a){return!(1!==(null!=a?a.nodeType:void 0))},a.prototype.getParents=function(a){var b,c;if(c=[],this.isElement(a))for(b=a;this.isElement(b);)c.push(b),b=b.parentNode;return c},a.prototype.getTagSelector=function(a){return this.sanit