Skip to content

Instantly share code, notes, and snippets.

View kennethlynne's full-sized avatar

Kenneth Lynne kennethlynne

View GitHub Profile
{"v":"4.6.0","fr":60,"ip":0,"op":150,"w":344,"h":76,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[172,38,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[],"ip":0,"op":300,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":4,"nm":"Wireframe Outlines","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[172,38,0]},"a":{"a":0,"k":[172,38,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"a":0,"k":{"i":[[2.209,0],[0,0],[0,2.209],[0,0],[-2.209,0],[0,0],[0,-2.209],[0,0]],"o":[[0,0],[-2.209,0],[0,0],[0,-2.209],[0,0],[2.209,0],[0,0],[0,2.209]],"v":[[13,17],[-13,17],[-17,13],[-17,-13],[-13,-17],[13,-17],[17,-13],[17,13]],"c":true}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"tr","p":{"a":0,"k":[17,17],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k
@kennethlynne
kennethlynne / clean-up-git.sh
Created March 23, 2017 09:06
Remove local branches not longer on remote
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
@kennethlynne
kennethlynne / sketch2png.js
Last active April 16, 2016 23:58
export png from artboards and slices in sketch
var gulp = require('gulp');
var sketch = require('gulp-sketch');
var argv = require('yargs').argv;
var del = require('del');
var runSequence = require('run-sequence');
var outputDir = './output/';
if (!argv && argv.path) {
throw new Error('path argument missing');
@kennethlynne
kennethlynne / circle.yml
Last active February 27, 2016 12:56 — forked from jonah-williams/circle.yml
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormer Beta - template creation prototype application. This tool allows you to create an AWS CloudFormation template from the AWS resources in your AWS account. **Warning** This template creates a single EC2 instance in your account to run the application - you will be billed for the instance at normal AWS EC2 rates.",
"Parameters" : {
"Username" : {
"Description" : "Username to log in to CloudFormer",
"Type" : "String"
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Setting up your own private and secure VPN",
"Mappings": {
"AWSInstanceType2Arch": {
"High.Speed.VPN-Paid": {
"InstanceType": "t2.medium"
},
"Standard.VPN-Free": {
"InstanceType": "t2.micro"
<!-- In index.html: <link rel="import" href="components/list-item.html"> -->
<template>
<style>
</style>
<div>Web component, right there</div>
@kennethlynne
kennethlynne / js-stack-trace.js
Last active August 29, 2015 14:09
DIY javascript stack trace
// Copied from http://helephant.com/2007/05/12/diy-javascript-stack-trace/ - read more about the approach there
Function.prototype.trace = function()
{
var trace = [];
var current = this;
while(current)
{
trace.push(current.signature());
current = current.caller;

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@kennethlynne
kennethlynne / ui-sref-fastclick-decorator.js
Created October 2, 2014 15:06
A decorator to override uiSref to trigger state change on touchstart instead of click (to remove 300ms delay on touch screens)
'use strict';
// A decorator to override uiSref to trigger state change on touchstart if the element does not have disable-fastclick attribute
// It also logs the time between state changes
angular.module('app')
.config(function ($provide) {
$provide.decorator('uiSrefDirective', function ($delegate) {
var originalUiSref, originalUiSrefLink;
originalUiSref = $delegate[0];
originalUiSrefLink = originalUiSref.link;