Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jenbennings on github.
  • I am benjennings (https://keybase.io/benjennings) on keybase.
  • I have a public key whose fingerprint is D449 1DB8 8578 6990 E438 CB05 F74A 6177 A85C C1B3

To claim this, I am signing this object:

@jenbennings
jenbennings / isometric.sketchplugin
Last active August 29, 2015 13:57
Isometric test for Sketch
#import 'elegantchaos.js'
if ([selection length] === 1) {
var layer = selection[0],
frame = [layer frame],
height = [frame height];
// rotate it
[layer setRotation:"45"];
// Paste Into (ctrl alt command m)
#import 'elegantchaos.js'
com.elegantchaos.execute(function() {
mask = doc.selectedLayers()[0];
maskParent = [mask parentGroup];
newGroup = [MSLayerGroup new];
[maskParent addLayer:newGroup];
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
@jenbennings
jenbennings / sketch-framer-config.js
Created April 8, 2014 02:23
A modified Sketch Framer export that includes custom.js (FastClick)
/*
If you remove any variables from this file, the plugin won't work. If the plugin stops working, replace this file with a fresh copy from Github.
*/
/*
If you have a common library file you'd like to include in your mocks, put a valid URL in FramerLibraryUrl. This will create a copy of the file in the Framer folder of the prototype, also insert a line to index.html to include the script.
By default this is undefined, so no library will get included.
@jenbennings
jenbennings / gist:11310540
Created April 26, 2014 02:51
Update remote
# Update remote if repo name changes
git remote set-url origin git://new.url.here
Just testing out how [mkdown](http://www.mkdown.com) works...
# Important heading
> People say this
I disagree. Here's why:
- important point 1
- important point 2
- important point 3
@jenbennings
jenbennings / app.js
Last active August 29, 2015 14:01
Testing Framer 3
base = new Layer({width:640, height:1136})
settingsButton = new Layer({width:60, height: 60})
waggleButton = new Layer({width: 60, height: 60})
cancelButton = new Layer({width: 60, height: 60})
waggleButton.superLayer = base
settingsButton.superLayer = base
waggleButton.maxX = 640
cancelButton.opacity = 0
cancelButton.maxX = 590
settings = new Layer({width:640, height: 1136})
@jenbennings
jenbennings / fonts.css
Created June 17, 2014 02:57
Typotheque font import
@font-face {
font-family: "Jigsaw";
src: url("https://s3.amazonaws.com/fonts.typotheque.com/WF-XXXXXX-XXXXXX-XXXXXX-XXXXXXXXXX.eot");
src: url("https://s3.amazonaws.com/fonts.typotheque.com/WF-XXXXXX-XXXXXX-XXXXXX-XXXXXXXXXX.eot?#iefix") format("embedded-opentype"), url("https://s3.amazonaws.com/fonts.typotheque.com/WF-XXXXXX-XXXXXX-XXXXXX-XXXXXXXXXX.woff") format("woff"), url("https://s3.amazonaws.com/fonts.typotheque.com/WF-XXXXXX-XXXXXX-XXXXXX-XXXXXXXXXX.svg#typotheque_webfonts_service") format("svg");
font-style: normal;
font-weight: 300;
font-stretch: normal;
}
@font-face {
me.on Events.DragMove, ->
dX = Math.abs(avatarBackground.midX - me.midX)
dY = Math.abs(avatarBackground.midY - me.midY)
if dX < 42 && dY < 42
avatarBackground.states.switch("hover")
me.states.switch("hover")
else
me.backgroundColor = "purple"