Skip to content

Instantly share code, notes, and snippets.

View phivk's full-sized avatar
On a boat

Philo van Kemenade phivk

On a boat
View GitHub Profile
@phivk
phivk / plugins
Created December 3, 2012 00:56
demo of using several popcorn.js plugins on a vimeo video
<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling the Vimeo player plugin
var pop = Popcorn.vimeo(

Honeycomb Icecream Supply Chain

Data Model, most directly copied from MCR site

@phivk
phivk / hypnotic stars GLC
Created March 8, 2016 19:05
hypnotic stars in GifLoopCoder
function onGLC(glc) {
glc.loop();
glc.size(400, 400);
glc.setDuration(3.5);
glc.setFPS(30);
glc.setMode('single');
//glc.setEasing(false);
glc.setMaxColors(256);
glc.setQuality( 1 );
var list = glc.renderList,
# Grav Specific
.sass-cache
composer.lock
cache/*
assets/*
logs/*
images/*
user/data/*
# OS Generated
@phivk
phivk / p5.js npm scripts
Created March 1, 2017 08:40
npm scripts for simple p5.js sketch
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-js": "browserify index.js -o build/bundle.js",
"watch-js": "nodemon -e js -w sketch.js -x 'npm run build-js'",
"browser-sync": "browser-sync start --server --files ./sketch.js",
"watch": "npm run watch-js",
"dev": "npm run watch & npm run browser-sync"
},
@phivk
phivk / js-array-map.sublime-snippet
Created May 28, 2017 10:35
Javascript Array Map Sublime Text Snippet
<snippet>
<content><![CDATA[
map(function(${1:value}, ${2:index}, ${3:array}) {
return ${0}
});
]]></content>
<tabTrigger>map</tabTrigger>
<scope>source.js</scope>
<description>Array map</description>
</snippet>
@phivk
phivk / catmullFitter.js
Created June 15, 2017 14:36 — forked from nicholaswmin/catmull-rom.js
Catmull Rom Fitting Algorithm in Javascript through a series of X/Y Points
/**
* Interpolates a Catmull-Rom Spline through a series of x/y points
* Converts the CR Spline to Cubic Beziers for use with SVG items
*
* If 'alpha' is 0.5 then the 'Centripetal' variant is used
* If 'alpha' is 1 then the 'Chordal' variant is used
*
*
* @param {Array} data - Array of points, each point in object literal holding x/y values
* @return {String} d - SVG string with cubic bezier curves representing the Catmull-Rom Spline
@phivk
phivk / python3 local server
Created June 15, 2017 22:01
start a http server with python3
python3 -m http.server
@phivk
phivk / package.jscon
Created July 20, 2017 14:48
boilerplate package.json for npm script based workflow
{
"name": "npm-scripts-boilerplate",
"version": "1.0.0",
"description": "npm scripts based workflow including scss & livereload",
"dependencies": {
"lodash": "^4.17.4"
},
"devDependencies": {
"browserify": "latest",
"livereload": "latest",
@phivk
phivk / gist:51e3cccd45dbaa2c063c0504f525c95c
Created August 8, 2017 09:10
create a gif from images on the command line using ImageMagick
convert -resize 50% -delay 20 -loop 1 *.png mygif.gif