Skip to content

Instantly share code, notes, and snippets.

Avatar
🥝
AMA about working at @webflow

Forrest O. forresto

🥝
AMA about working at @webflow
View GitHub Profile
@forresto
forresto / pickFile.ts
Last active Feb 3, 2021
pickFile: vanilla dom typescript function (promise / async friendly) to pick a file (why isn't this a standard dom function?)
View pickFile.ts
/*
// How to use
export const triggerSVGImportFilePicker = async () => {
const files = await pickFile({ accept: ".svg" });
if (files && files.length) {
handleFiles(files);
}
};
*/
@forresto
forresto / hello-vue.js
Last active Oct 28, 2020
hello-vue.js
View hello-vue.js
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue! AF is cool.'
}
})
@forresto
forresto / 2020-10-28-coworking-sess.json
Created Oct 28, 2020
2020-10-28-coworking-sess.json
View 2020-10-28-coworking-sess.json
{
"info": {
"title": "cam to gif",
"author": "forresto",
"description": "webcam to animated gif",
"url": "2020-10-28-coworking-sess"
},
"nodes": [
{
"id": 1,
@forresto
forresto / vid-split-and-loop.meemoo.json
Created Sep 19, 2020
meemoo: webcam to video to multiple players
View vid-split-and-loop.meemoo.json
{
"info": {
"title": "vid split and loop: 1234",
"author": "forresto",
"description": "webcam to video to multiple players",
"url": "vid-split-and-loop"
},
"nodes": [
{
"id": 2,
@forresto
forresto / pingpong.ae.js
Last active Aug 18, 2020
ae pingpong scripting pseudocode
View pingpong.ae.js
// Imagined API
import AE from 'ae'
// Assumes playBackwardDuration is less than playForwardDuration
function (clip, playForwardDuration, playBackwardDuration) {
let time = 0;
const edits = []
while (time < clip.clipDuration) {
let playHead = time;
edits.push(AE.edit(playHead, playHead + playForwardDuration, 1));
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View dr_evil.meemoo.json
{
"info": {
"title": "dr_evil",
"author": "forresto",
"description": "mp4 to grid",
"url": "dr_evil"
},
"nodes": [
{
"id": 4,
@forresto
forresto / nocode-animator.meemoo.json
Last active Nov 13, 2019
nocode-animator.meemoo.json
View nocode-animator.meemoo.json
{
"info": {
"title": "nocode-animator",
"author": "forresto",
"description": "webcam to lottie: refresh the page to reset if things get broken :)",
"url": "nocode-animator",
"parents": [
"https://gist.github.com/ed6b77cdefd9e1aa48362169a86f94b6"
]
},
View homer-back-away-slowly.meemoo.json
{
"info": {
"title": "back-away-slowly",
"author": "forresto",
"description": "not sure where i'm going with this, tho neat that small vid data urls can be stored in app json",
"url": "back-away-slowly-2",
"parents": [
"https://gist.github.com/efe2ea80b8944ea8f2849cddf252638b"
]
},