Skip to content

Instantly share code, notes, and snippets.

@Chandler
Chandler / slack_history.py
Last active March 27, 2025 01:16
Download Slack Channel/PrivateChannel/DirectMessage History
print("UPDATE AUG 2023: this script is beyond old and broken")
print("You may find interesting and more up to date resources in the comments of the gist")
exit()
from slacker import Slacker
import json
import argparse
import os
# This script finds all channels, private channels and direct messages
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active January 20, 2026 22:43
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@mattdesl
mattdesl / addBarycentricCoordinates.js
Created August 16, 2017 01:59
unindex + add barycentric coordinates
import buffer from 'three-buffer-vertex-data';
export default function addBarycentricCoordinates (bufferGeometry) {
const barycentric = [];
const attrib = bufferGeometry.getIndex() || bufferGeometry.getAttribute('position');
const count = attrib.count / 3;
if (count % 2 !== 0) {
// Probably won't ever happen
console.error('WARN: Got a weird decimal result for attribute count, skipping wireframe...');
return;
function getUpdates() {
updateCell("B3", "ripple")
updateCell("C3", "bitcoin")
updateCell("D3", "ethereum")
updateCell("E4", "litecoin")
updateCell("F4", "iota")
}
function updateCell(cell, code) {
const response = UrlFetchApp.fetch("https://api.coinmarketcap.com/v1/ticker/" + code + "/?convert=EUR")
@mattdesl
mattdesl / about.md
Last active February 22, 2024 06:39
Parse & render SVG with penplot

parse & render SVG file with penplot

This might be handy if you have an SVG file that you want to use as, say, a mask for a generative algorithm.

Place the SVG file in the same directory that you are running penplot from.

test

/* This can be the start of a module */
const makeHandler = cb => {
return {
get (object, prop, receiver) {
if (Reflect.has(object, prop)) {
return Reflect.get(...arguments)
}
return new Proxy(() => {}, {
@mattdesl
mattdesl / README.md
Last active July 22, 2019 06:31
wasm + budo/browserify
@getify
getify / 1.js
Last active March 19, 2023 08:32
tag function for formatting console.log(..) statements
function logger(strings,...values) {
var str = "";
for (let i = 0; i < strings.length; i++) {
if (i > 0) {
if (values[i-1] && typeof values[i-1] == "object") {
if (values[i-1] instanceof Error) {
if (values[i-1].stack) {
str += values[i-1].stack;
continue;
}
@mattdesl
mattdesl / about.md
Last active October 16, 2018 11:57
regl + canvas sketch + hot reloading

canvas-sketch + regl + hot reloading

To quick start:

# move to an empty folder
mkdir my-folder && cd my-folder

# paste regl.js file
pbpaste &gt; regl.js
@getify
getify / 1.js
Last active September 29, 2021 11:58
experiment: mimicking React's new "useState()" hook for stand-alone functions, including "custom hooks"
"use strict";
[foo,bar] = TNG(foo,bar);
// NOTE: intentionally not TNG(..) wrapping useBaz(), so that it's
// basically like a "custom hook" that can be called only from other
// TNG-wrapped functions
function foo(origX,origY) {
var [x,setX] = useState(origX);
var [y,setY] = useState(origY);