Skip to content

Instantly share code, notes, and snippets.


Kelly Sutton kellysutton

View GitHub Profile
kellysutton / Gemfile
Last active Oct 31, 2016
View Gemfile
gem 'strict_templates'
kellysutton / application.js
Last active Sep 10, 2016
Real-time Recipe for Rails and Ember using Pusher
View application.js
// app/routes/application.js
import Ember from 'ember';
export default Ember.Route.extend({
currentUser: Ember.inject.service(),
pusher: Ember.inject.service(),
activate() {
kellysutton / generative-utility-colors.sass
Last active Jul 27, 2016
Generating Color Utility Classes in SASS
View generative-utility-colors.sass
$color-list {
red #f00,
green #0f0,
blue #00f
@each $value in $color-list {
.#{nth($value, 1)} {
color: nth($value, 2);
View exhaustive-markup.html
<img srcset=" 50w, 100w, 150w,
... 5200w, 5260w"
alt="A white flower"
kellysutton / img.html
Created Apr 20, 2016
srcset insanity
View img.html
<img srcset=" 50w, 100w, 150w, 200w, 250w, 300w, 350w, 400w, 450w, 500w,
View srcset.html
asset-2x.png 2x,
asset-3x.png 3x"
View float-array-to-hex-string.js
paths: {
ramda: ''
require(['ramda'], function (_) {
const trace = _.curry(function(tag, x) {
console.log(tag, x);
return x;
View cleanup.js
import Ember from 'ember';
const { computed, on } = Ember;
// Our Higher Order Function, as before
let has = field => computed.notEmpty(field);
// The Component UI fields as before.
const UI_FIELDS = ['userName', 'password'];
kellysutton / clean-template.hbs
Last active Aug 29, 2015
Reducing “action cruft” in your Ember templates
View clean-template.hbs
{{post-detail post=post}}
kellysutton / blog-post
Last active Aug 29, 2015
Public Drafts in Jekyll
View blog-post
layout: post
title: "Public Drafts in Jekyll"
date: 2015-02-18 00:00:00
draft: true
One of the things I like to do with more…
You can’t perform that action at this time.