Skip to content

Instantly share code, notes, and snippets.

View roryashfordbentley's full-sized avatar
🌭
Wranglin'

Rory Ashford-Bentley roryashfordbentley

🌭
Wranglin'
View GitHub Profile
@roryashfordbentley
roryashfordbentley / SassMeister-input.scss
Created November 10, 2014 16:58
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
//
// Flexbones Grid System
//
// Version 1.2
// Author: Rory Ashford
@roryashfordbentley
roryashfordbentley / SassMeister-input.scss
Created November 13, 2014 09:33
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
// Sass variables scope example
$test: true;
$name: ".beefy";
@roryashfordbentley
roryashfordbentley / gist:a251f4f118bc7777b25c
Last active August 29, 2015 14:09
We are living in a post grunt world and I am a post grunt girl
{
"name": "Flexbones",
"version": "0.1.0",
"description": "Flexbones script running in a post Grunt world",
"scripts": {
"compile-sass": "sass assets/sass/style.scss:style.css",
"concat": "concat-cli --files assets/js/**/*.js --output scripts.min.js",
"uglify-js": "uglifyjs scripts.min.js -o scripts.min.js",
"build-js": "npm run concat && npm run uglify-js",
"optimise-images": "imageoptim-cli --directory assets/imgs",
@roryashfordbentley
roryashfordbentley / grunt-vs-npm
Last active December 30, 2020 20:23
Grunt vs NPM
/**
* After reading a few articles
* (http://substack.net/task_automation_with_npm_run)
* (http://blog.keithcirkel.co.uk/why-we-should-stop-using-grunt/)
* and discussing with other developers on Twitter
* (@benhowdle, @_mikefrancis,@zachmayberry)
* I put together a replacement of my current Grunt workflow using npm via
* package.json using npm cli plugins instead of grunt specific plugins.
*
* I found that several grunt plugins were just wrappers for npm mopdules,
@roryashfordbentley
roryashfordbentley / fixed aspect ratio
Created January 4, 2015 17:44
Sass mixin to make element a fixed aspect ratio
/**
* _aspect-ratios.scss
*
* Mixin to display block level elements at
* fixed aspect ratios using padding top
* on an :after pseudo element.
*/
@mixin aspect-ratio($h,$v){
@roryashfordbentley
roryashfordbentley / Sass DocBlockr
Last active August 29, 2015 14:15
Dockblockr example for sass mixins and functions
/**
* testFoo
*
* @param {[int]} $foo [description]
* @param {[int]} $bar [description]
*/
@mixin testFoo($foo,$bar){
width: $foo;
height: $bar;
}
@roryashfordbentley
roryashfordbentley / gist:1aaa749385474b265a1d
Created March 19, 2015 10:12
building with package.json
{
"name": "bob the builder",
"version": "0.1.0",
"description": "Build all the things",
"author": "Rory Ashford <[email protected]>",
"scripts": {
"compile-sass": "node-sass --output-style compressed assets/sass/style.scss style.css && autoprefixer --map style.css",
"browserify-js": "browserify assets/js/scripts.js -o scripts.js",
"uglify-js": "uglifyjs scripts.js -o scripts.min.js -c",
"process-js": "npm run browserify-js && npm run uglify-js",
@roryashfordbentley
roryashfordbentley / SassMeister-input.scss
Created April 28, 2015 09:07
Generated by SassMeister.com.
// ----
// libsass (v3.1.0)
// ----
// S/Small
$s: (null null);
// M/Medium
$m: (800px 900px);
@roryashfordbentley
roryashfordbentley / flextype.css
Last active August 29, 2015 14:20
Readable responsive typography.
.content {
font-size: 1.2rem;
line-height: 1.5; }
@media (min-width: 800px) and (max-width: 900px) {
.content {
font-size: 1.4rem; } }
@media (min-width: 1000px) {
.content {
font-size: 1.8rem;
line-height: 1.3; } }
@roryashfordbentley
roryashfordbentley / hehadnodebodytogowith.js
Created August 6, 2015 15:39
Stuck trying to get my noggin around callbacks
/**
* getWpVersionInfo - gets the lates WordPress version and download links
* @param {Function} cb Callback function that is neccessary for data and errors
* @return {Object} Thisreturns selected data extracted from the api/json request
*/
function getWpVersionInfo(cb) {
// Pass the API details to the http.get method
return http.get({
host: 'api.wordpress.org',
path: '/core/version-check/1.7/'