Skip to content

Instantly share code, notes, and snippets.

View davo's full-sized avatar
🏠

Davo Galavotti davo

🏠
View GitHub Profile
@davo
davo / troubleshooting_shaders.md
Last active October 19, 2022 19:55
Using Lygia shaders with web technologies

Shaders: fetching / parsing strategies on web based REPLs

  • vite-glsl: Using this Vite plugin to import local dependencies, or load inline shaders. Github Repo by Ustym Ukhman.

  • glslfy: Node module based, combined with babel-parse-glsl allows to inject shaders with dependencies declared on the package.json. Commonly used in three.js & react-three-fiber. Github Repo part of the Stack.gl project.

  • glslify-loader: glslify loader module for webpack. Commonly used with React-based frameworks like Next.js. Github Repo.

  • html script: via scrip tag with x-script attribute. Common among old three.js articles. Demo: Minimal three.js shader example by Kyle McDonald.

@davo
davo / gsap-properties-cheat-sheet.md
Created April 12, 2018 21:35 — forked from lunelson/gsap-properties-cheat-sheet.md
Greensock Properties Cheat Sheet

Greensock CSS properties Cheat Sheet

I wrote this as a reference for myself because some of the property names are non-obvious, and there are a number of relevant special properties, and there is no central concise listing of them all in GSAP Docs, other than (in longer form) on the CSSPlugin page.

Standard CSS properties

...are all supported, with hyphenated-names becoming camelCaseNames. Non-animatable properties are also supported but they will be set at the beginning of the tween.

Special mentions:

@davo
davo / index.html
Last active July 6, 2022 15:30
Export CartoDB GeoJSON to TopoJSON.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@davo
davo / .block
Last active May 1, 2022 00:23 — forked from d3noob/.block
Filtering in v7
license: mit
@davo
davo / GaiaBlenderCode.py
Created January 11, 2022 03:27
Gaia coding
]\;;lop[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[cioux3n import os
import bpy
function getButton(node, index) {
const btn = node.querySelector(".updates--updateButton--3lvlN");
if (index === 0) {
btn.click();
}
}
function parseUpdates() {
[...document.querySelectorAll(".updates--updateRow--3D3bW")].map(
(node, index) => {
@davo
davo / CopyFigmaPlugins.js
Created June 18, 2021 18:06
Copy all plugins from you Figma account
copy(
Array.from(document.querySelectorAll('.plugin_tiles--installedPluginsList--1RWHl > .plugin_tiles--installedPluginTile--3npNa a')).map(({innerText, href}) => {
let plugins = []
let plugin_name = innerText
let plugin_link = href
let plugin = {
name: plugin_name,
global.THREE = require("three");
const canvasSketch = require('canvas-sketch');
const Random = require('canvas-sketch-util/random');
const gradientHeight = 512;
const settings = {
dimensions: [ 2048, gradientHeight * 2 ]
};
@davo
davo / cloudTrailEventNames.list
Created May 12, 2020 15:28 — forked from pkazi/cloudTrailEventNames.list
List of values for parameter EventName in AWS Cloudtrail events
AbortDocumentVersionUpload
AbortEnvironmentUpdate
AbortMultipartUpload
AbortVaultLock
AcceptAccountMapping
AcceptCertificateTransfer
AcceptDelegate
AcceptDirectConnectGatewayAssociationProposal
AcceptFxPaymentCurrencyTermsAndConditions
AcceptHandshake
@davo
davo / ffmpeg.sh
Created December 12, 2019 00:12
FFMPEG for Twitter Videos
ffmpeg -i input.mov -pix_fmt yuv420p -vcodec libx264 -vf scale=1920:-1 -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -ac 2 -strict experimental -r 30 outpu.mp4