Skip to content

Instantly share code, notes, and snippets.

View jodyheavener's full-sized avatar
🥰

Jody Heavener jodyheavener

🥰
View GitHub Profile
<div class="contact">
<?php $social_icons = array(
'bandcamp',
'behance',
'delicious',
'deviantart',
'digg',
'dribbble',
'etsy',
@jodyheavener
jodyheavener / gist:afba9be8f4bea63282ca
Created November 12, 2014 17:57
Animation keyframe mixin
@mixin keyframes($animation-name) {
@-webkit-keyframes $animation-name {
@content;
}
@-moz-keyframes $animation-name {
@content;
}
@-ms-keyframes $animation-name {
@content;
}
@jodyheavener
jodyheavener / gist:d57d2f744b0bcd32eb65
Created December 15, 2014 18:25
Animation mixins
/* Animation and Transform mixins */
@mixin animation($str) {
-webkit-animation: #{$str};
-moz-animation: #{$str};
-ms-animation: #{$str};
animation: #{$str};
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
}
@jodyheavener
jodyheavener / index.slim
Created January 7, 2015 17:17
My Dream Cars 2
doctype 5
head
meta charset="utf-8"
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
meta name="viewport" content="width=device-width"
title My Dream Cars
link rel="stylesheet" href="styles/site.css"
@jodyheavener
jodyheavener / bling.js
Last active August 29, 2015 14:23 — forked from Gwash3189/bling.js
// bling.js
//
// fork of https://gist.github.com/Gwash3189/98922b1078c4327dd0dd
// which is a fork of https://gist.github.com/paulirish/12fb951a8b893a454b32
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function(name, fn) {
var _this = this;
@jodyheavener
jodyheavener / svg_helper.rb
Created October 7, 2016 04:29
Rails Helper to maintain SVGs and consistently output them in your views.
# Allows Rails views to output consistent inline SVG code
module SvgHelper
def svg(named, options={})
svg_data = svg_defs[named]
defaults = {
:verion => "1.1",
:role => "img",
:width => svg_data[:width],
@jodyheavener
jodyheavener / env.js
Last active October 8, 2017 03:11
Various Javascript utilities
// Use this to access process env vars in a React setup
export function env(key, fallback) {
return process.env[`REACT_APP_${key}`] || fallback;
}
@jodyheavener
jodyheavener / Instructions.md
Created August 18, 2015 04:55
Use Babel (ES6) with Sails JS

Inspired by this issue, with these instructions you should be able to get Babel transpiling your JS in Sails JS for the client side.

  1. Install Grunt Babel npm install --save grunt-babel
  2. Create a babel.js file under tasks/config and add something like the following:
module.exports = function(grunt) {

    grunt.config.set('babel', {
dev: {
@jodyheavener
jodyheavener / Import SVG.sketchplugin
Last active February 11, 2020 17:44
Import a desired SVG in to a Sketch canvas
// Import Ale's fantastic Sketch Sandbox
// https://github.com/bomberstudios/sketch-sandbox
#import 'sketch-sandbox.js'
// Are we on a page or an artboard?
var page = doc.currentPage();
var canvas = page.currentArtboard() ? page.currentArtboard() : page;
// Define the location of the file you want to import, using file:// protocol
var fileURL = NSURL.URLWithString("file:///Users/johndoe/Downloads/my_cat.svg");
@jodyheavener
jodyheavener / adobexd-rectangle.js
Created February 22, 2020 21:29
Creating simple Rectangles in Adobe XD, Figma, and Sketch
import { Rectangle, Color } from 'scenegraph';
let rectangle = new Rectangle();
rectangle.name = 'Example';
rectangle.width = 100;
rectangle.height = 200;
rectangle.fill = new Color('#2345ac');
rectangle.fillEnabled = true;