Skip to content

Instantly share code, notes, and snippets.

View davo's full-sized avatar
🦮
Golden

Davo Galavotti davo

🦮
Golden
View GitHub Profile
@shakram02
shakram02 / ffmpeg_fade_frames.py
Last active January 17, 2020 22:24
Fade consecutive frames using ffmpeg and python a modified clone of https://gist.github.com/anguyen8/d0630b6aef6c1cd79b9a1341e88a573e
import os
import math
import sys
import glob
import subprocess
import time
from subprocess import Popen
from os.path import join
from subprocess import PIPE
@RemyPorter
RemyPorter / MarkovGlyphs.pde
Last active May 29, 2021 16:33
A Markov Chain-based glyph generator
/**
A markov-chain based glyph generator. Given sequences of points as a corpus, this will create a markov chain based on those points.
Then, by sampling the chain, we can generate entirely new glyphs that weren't in our original dataset.
Press "r" to generate a new frame. Press "s" to save the frame to a file (with a random UUID as its name).
Requires the PostFx library: https://github.com/cansik/processing-postfx/
*/
import java.util.*;
@seanriceaz
seanriceaz / sync.js
Created April 10, 2019 23:11
Sync figma layer images up to a firebase bucket
// NOTE: This expects a few things to be stored in a .env file:
// FBKEY=xxxxxxxxx
// FIGMAPERSONALTOKEN=xxxxxxxxxxx
// GOOGLE_APPLICATION_CREDENTIALS=/users/your.name/googlekeys/firebase-storage.json
const axios = require('axios');
const dotenv = require('dotenv');
const Storage = require('@google-cloud/storage');
@NikaBuligini
NikaBuligini / useDocumentVisibility.js
Last active February 14, 2023 12:30
useDocumentVisibility (react hook)
import React from 'react';
import useEventListener from './useEventListener';
function getVisibilityPropertyNames() {
// Opera 12.10 and Firefox 18 and later support
if (typeof document.hidden !== 'undefined') {
return ['hidden', 'visibilitychange'];
}
@koenbok
koenbok / store.ts
Last active November 10, 2023 00:17
import * as React from "react";
/**
A hook to simply use state between components
Warning: this only works with function components (like any hook)
Usage:
// You can put this in an central file and import it too
const useStore = createStore({ count: 0 })
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active May 13, 2025 14:13
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@lorey
lorey / basic.py
Created March 16, 2019 16:40
Keeping Pandas DataFrames clean when importing JSON
from pandas.io.json import json_normalize
df = json_normalize(data)
@joaoferrao
joaoferrao / caws.go
Last active February 12, 2023 15:47
AWS Resource Crawler
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/olekukonko/tablewriter"
"os"
"strings"
@mattdesl
mattdesl / about.md
Created February 14, 2019 16:03
A Browser and Node.js compatible canvas-sketch script for generative and parametric 3D geometry.

Generative Geometry in Browser + Node.js

Here is a script that can be run with canvas-sketch to generate OBJ files from a parametric/algorithmic 3D ThreeJS geometry.

Hitting "Cmd + S" from the canvas-sketch tool will export a PNG and OBJ file of the scene.

If the same script is run from Node, it will simply render the OBJ to stdout, or write to the filename argument if given.

import PropTypes from 'prop-types';
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
type Defined<T> = T extends undefined ? never : T;
/**
* Get the type that represents the props with the defaultProps included.
*
* Alternatively, we could have done something like this: