Skip to content

Instantly share code, notes, and snippets.

Avatar
🤡
I may be slow to respond.

Daniel Furze furzeface

🤡
I may be slow to respond.
View GitHub Profile
@furzeface
furzeface / result.js
Created Oct 25, 2018
Reusable result snippet
View result.js
result = result && result.result ? result.result : result;
@furzeface
furzeface / ITCSS.sh
Created Jun 14, 2018
ITCSSify things. I keep needing to do this when refactoring legacy projects.
View ITCSS.sh
#!/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 Jan 14, 2015
Show which media query you’re using
View media-query.less
// Show which media query you’re using
body {
padding-bottom: 4rem;
&:after {
position: fixed;
bottom: 0;
left: 0;
@furzeface
furzeface / Gruntfile.js
Last active Aug 29, 2015
Sample Gruntfile.js file for Yeoman generator.
View Gruntfile.js
/**
* @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 Aug 29, 2015
Sample bower.json file.
View bower.json
{
"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 Sep 28, 2014
Sample bower.json template for Yeoman generator.
View sample-bower-template.json
{
"name": "<%= _.slugify(projectName) %>",
"version": "0.0.0",
"dependencies": {
},
"devDependencies": {
"sassface": "~1.2.0"
}
}
@furzeface
furzeface / grunt-pugpig-issues-usage.js
Created Sep 23, 2014
Grunt Pugpig issues XML usage.
View grunt-pugpig-issues-usage.js
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 Sep 23, 2014
Grunt Pugpig editions XML usage.
View grunt-pugpig-editions-usage.js
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 Sep 23, 2014
Grunt Pugpig contents XML usage.
View grunt-pugpig-contents-usage.js
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 Aug 22, 2016
My Sass Media Query Mixin...cos I keep forgetting to share this.
View Media Query Mixin
//=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
You can’t perform that action at this time.