Skip to content

Instantly share code, notes, and snippets.

View furzeface's full-sized avatar
🤡
I may be slow to respond.

Daniel Furze furzeface

🤡
I may be slow to respond.
View GitHub Profile
@furzeface
furzeface / result.js
Created October 25, 2018 14:49
Reusable result snippet
result = result && result.result ? result.result : result;
@furzeface
furzeface / ITCSS.sh
Created June 14, 2018 13:18
ITCSSify things. I keep needing to do this when refactoring legacy projects.
#!/bin/bash
mkdir -p ./src/styles
touch ./src/styles/main.scss
mkdir -p ./src/styles/{base,components,generic,objects,settings,tools,trumps}
touch ./src/styles/{base,components,generic,objects,settings,tools,trumps}/__index.scss
echo "// Base - Unclassed HTML elements (type selectors)" > ./src/styles/base/__index.scss
echo "// Components - Designed components, chunks of UI" > ./src/styles/components/__index.scss
echo "// Generic - Ground-zero styles (normalize, resets, box-sizing etc)" > ./src/styles/generic/__index.scss
@furzeface
furzeface / media-query.less
Created January 14, 2015 09:59
Show which media query you’re using
// Show which media query you’re using
body {
padding-bottom: 4rem;
&:after {
position: fixed;
bottom: 0;
left: 0;
@furzeface
furzeface / Gruntfile.js
Last active August 29, 2015 14:07
Sample Gruntfile.js file for Yeoman generator.
/**
* @file Gruntfile
* @version <%= projectVersion %>
* @author {@link https://github.com/<%= yourGitHub %> <%= yourName %>}
*/
module.exports = function (grunt) {
// Time all the things
require('time-grunt')(grunt);
// Load all NPM tasks
@furzeface
furzeface / bower.json
Last active August 29, 2015 14:07
Sample bower.json file.
{
"name": "myProject",
"version": "1.0.0",
"authors": [
"Daniel Furze <daniel@furzeface.com>"
],
"description": "My awesome project.",
"main": "index.html",
"keywords": [
"Bower"
@furzeface
furzeface / sample-bower-template.json
Created September 28, 2014 09:53
Sample bower.json template for Yeoman generator.
{
"name": "<%= _.slugify(projectName) %>",
"version": "0.0.0",
"dependencies": {
},
"devDependencies": {
"sassface": "~1.2.0"
}
}
@furzeface
furzeface / grunt-pugpig-issues-usage.js
Created September 23, 2014 11:14
Grunt Pugpig issues XML usage.
grunt.initConfig({
pugpig_issues_xml: {
custom_options: {
options: {
root: 'content.xml',
dest: 'deploy/',
fileName: 'issues',
partName: 'all',
partSrc: 'publication1.zip'
},
@furzeface
furzeface / grunt-pugpig-editions-usage.js
Created September 23, 2014 11:13
Grunt Pugpig editions XML usage.
grunt.initConfig({
pugpig_editions_xml: {
default_options: {
options: {
author: 'Building Blocks',
coverSrc: 'our_cover.jpg',
dest: 'deploy/',
editionName: 'publication1',
fileName: 'editions',
id: 'com.building-blocks.publication1',
@furzeface
furzeface / grunt-pugpig-contents-usage.js
Created September 23, 2014 11:13
Grunt Pugpig contents XML usage.
grunt.initConfig({
pugpig_contents_xml: {
default_options: {
options: {
author: pkg.author.name,
dest: 'dist/',
id: 'com.building-blocks.publication1',
fileName: 'content',
title: 'My first publication'
},
@furzeface
furzeface / Media Query Mixin
Last active August 22, 2016 03:45
My Sass Media Query Mixin...cos I keep forgetting to share this.
//=My breakpoint variables
//Usually kept in _variables.scss
$breakpoint-extra-small: 20em; //320px
$breakpoint-small: 30em; //480px
$breakpoint-medium: 50em; //800px
$breakpoint-extra-medium: 65em; //1040px
$breakpoint-large: 80em; //1280px
$breakpoint-extra-large: 100em; //1600px