Skip to content

Instantly share code, notes, and snippets.

function jsonEqual (a, b) {
return JSON.stringify(a) === JSON.stringify(b)
}
function originalIfUnchanged(state, nextState) {
if(state === nextState) {
return state
}
return jsonEqual(state, nextState) ? state : nextState
<dict>
<key>name</key>
<string>,</string>
<key>scope</key>
<string>meta.delimiter.comma</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#4E566B</string>
</dict>
// ----
// libsass (v3.1.0)
// ----
$baseUnit: 8
@function snap($value)
@return (round($value / $baseUnit) * $baseUnit +px)
body

RSD 2015 List

Exists at CD Cellar!

Various Artists - The Darjeeling Limited (Original Soundtrack)

THE DARJEELING LIMITED (ORIGINAL SOUNDTRACK) (Format: 12" Colored Vinyl)

@greypants
greypants / SassMeister-input-HTML.html
Created November 26, 2013 18:49 — forked from tommymarshall/SassMeister-input-HTML.html
Generated by SassMeister.com.
<button class="button -blue -large -rounded overrides -disable -right">I'm a button!</button>
@greypants
greypants / jquery.plugin.js
Created June 19, 2013 17:41 — forked from davist11/gist:2702312
JS: jQuery Plugin Pattern
/*
* 'Highly configurable' mutable plugin boilerplate
* Author: @markdalgleish
* Further changes, comments: @addyosmani
* Licensed under the MIT license
*/
// Note that with this pattern, as per Alex Sexton's, the plugin logic
// hasn't been nested in a jQuery plugin. Instead, we just use
// jQuery for its instantiation.
@greypants
greypants / APP.js
Created May 21, 2013 21:41
JS: Garber-Irish-Tello
APP = {
init: function() {
// Check for controller and action js
var body = document.body;
var controllerJs = this[body.getAttribute("data-controller")];
var actionJs = controllerJs ? controllerJs[body.getAttribute("data-action")] : false;
// Cache global vars
this.$body = $(body);
@greypants
greypants / application.scss
Created May 21, 2013 21:37
SCSS: application.scss strucutre
// Vendor helpers and resets
@import 'compass/css3';
@import 'normalize';
// Variables and mixins
@import 'setup/colors';
@import 'setup/defaults';
@import 'setup/fonts';
@import 'setup/mixins';
@greypants
greypants / compass.rb
Last active December 15, 2015 14:08
RUBY / COMPASS: Save global javascript variable references to generated sprite names
# Store javascript references to sprites in spriteList.js
# Author: [email protected]
on_sprite_saved do |file_path|
# Path to file where sprite data is to be stored
javascript_file = "public/javascripts/base/compass_sprites.js"
path_segments = file_path.split('/public').last.split('/')
file_name = path_segments.pop
image_path = path_segments.join('/') + '/'
base_folder = path_segments[2]
parent_folder = path_segments[path_segments.length - 1]
@greypants
greypants / webkit-mask-image.css
Created March 8, 2013 20:13
CSS: border-radius mask fix
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);