Skip to content

Instantly share code, notes, and snippets.

@frederickk
frederickk / easing.js
Last active July 24, 2020 07:40 — forked from gre/easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
var EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
@frederickk
frederickk / video-border-rotate.sh
Created April 24, 2020 18:06
Simple bash script to add border and/or rotate a video
#!/bin/bash
# https://gist.github.com/frederickk/d91751e88780ca0939e6bb344ad4dfcf
# Usage
# ./video-border-rotate.sh -i foo.mp4 -x 100 # Add 100px border on left and right
# ./video-border-rotate.sh -i foo.mp4 -y 100 # Add 100px border on top and bottom
# ./video-border-rotate.sh -i foo.mp4 -x 100 -y 150 # Add 100px border on left and right and 150px border on top and bottom
sides
# ./video-border-rotate.sh -i foo.mp4 -x 100 -y 150 -c "red" # Add 100px red border on left and right and 150px red border on top and bottom
# ./video-border-rotate.sh -i foo.mp4 -r 1 # Rotate video 90 degrees clockwise
@frederickk
frederickk / CreateGrid_0_0.js
Created February 3, 2012 12:58
a script which allows one to create a grid (margins, rows, and columns) in illustrator similar to "create guides..." in indesign.
/**
* Create Grid
*
* Ken Frederick
* ken.frederick@gmx.de
*
* http://cargocollective.com/kenfrederick/
* http://kenfrederick.blogspot.com/
*
*/
@frederickk
frederickk / ems-flasher-help.md
Last active January 6, 2019 08:53
EMS Flasher's documentation is pretty sparse. This gist is a collection of commands that I use fairly regularly, it is not comprehensive. Caveat, these commands work for me and I cannot guarantee they will work for you. Godspeed and good luck.

Build and Install

$ cd ./ems-flasher
$ ./config.sh
$ make
@frederickk
frederickk / FooLayer.framer
Last active March 15, 2018 00:29
Example of ES6 Class extending for Framer.js
# Download this file at https://www.dropbox.com/s/6et3x14akt9koqo/FooLayer.framer.zip?dl=0
# FooLayer.js is located in FooLayer.framer/modules/FooLayer.js
FooLayer = require 'FooLayer'
# 'Foo1' is defined for text, but 'Foo2' is displayed
foo1 = new FooLayer
bazProperty: 'Foo1'
barProperties:
backgroundColor: 'rgba(255, 0, 255, 0.2)'
x: 100
@frederickk
frederickk / FPreferences.js
Last active September 30, 2017 20:47
Class for handling preference within a Chrome Extension
'use strict';
/**!
* FPreferences.js
*
* Ken Frederick
* ken.frederick@gmx.de
*
* http://kenfrederick.de/
* http://blog.kenfrederick.de/
@frederickk
frederickk / FConfetti.css
Last active November 27, 2016 21:17
FConfetti Create CSS confetti, both css and js files are required
/**
* FConfetti
* Create CSS confetti
*
* Ken Frederick
* ken.frederick@gmx.de
*
* http://kennethfrederick.de/
* http://blog.kennethfrederick.de/
*
@frederickk
frederickk / loremIpsum_0_0.js
Created June 23, 2011 11:33
illustrator/scriptographer lorem ipsum generator
/**
* Lorem Ipsum 0.0
*
* Ken Frederick
* ken.frederick@gmx.de
*
* http://cargocollective.com/kenfrederick/
* http://kenfrederick.blogspot.com/
*
* A Lorem Ipsum/Greeking/Dummy-Text generator for Illustrator
@frederickk
frederickk / localserver.sh
Created March 31, 2016 07:26
A simple wrapper for running a local instance of Google's Python AppEngine
#!/usr/bin/env bash
#
# Ken Frederick
# ken.frederick@gmx.de
#
# http://kennethfrederick.de/
# http://blog.kennethfrederick.de/
#
# A simple wrapper for running a local instance of Google's
# Python AppEngine
@frederickk
frederickk / Weather.pde
Created June 16, 2012 17:56
a simple class to pull weather feed information from http://www.weather.com/
/**
* Weather.pde
* processing
*
* Ken Frederick
* ken.frederick@gmx.de
*
* http://cargocollective.com/kenfrederick/
* http://kenfrederick.blogspot.com/
*