Skip to content

Instantly share code, notes, and snippets.

@t3dotgg
t3dotgg / try-catch.ts
Last active March 20, 2025 08:18
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active March 20, 2025 08:17
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
@andrewreid
andrewreid / flow.json
Last active March 20, 2025 08:16
Node-RED flow for importing Amber Electric wholesale electricity prices into VRM
[
{
"id": "ede00cd79443d77a",
"type": "vrm-api",
"z": "405cbd599f05d654",
"vrm": "9fb7325ee595c4a0",
"name": "Change Dynamic ESS settings",
"api_type": "installations",
"idUser": "",
"users": "",
@samuelbradshaw
samuelbradshaw / python-pyenv-macos.md
Last active March 20, 2025 08:11
Installing Python 2 and 3 on macOS

Installing Python 2 and 3 on macOS

Starting with macOS 12.3, Python is no longer bundled with macOS. These instructions allow you to set up Python 2 and Python 3 side-by-side using pyenv. The instructions were tested on an Apple Silicon Mac, but the process on an Intel Mac should be similar.

Install Homebrew

Homebrew is a popular package manager that makes it easy to install command line tools. If you don’t yet have Homebrew installed, instructions can be found here: https://brew.sh

Verify that Homebrew is installed:

@ipenywis
ipenywis / cursor-memory-bank-rules.md
Last active March 20, 2025 08:10
Cursor Memory Bank

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
@cellularmitosis
cellularmitosis / README.md
Last active March 20, 2025 08:09
Comparing lzo compression levels (and gzip)
@nakamuraos
nakamuraos / reset-trial-navicat.sh
Last active March 20, 2025 08:09
Reset trial Navicat 15, Navicat 16, Navicat 17 on Linux
#!/bin/bash
# Author: NakamuraOS <https://github.com/nakamuraos>
# Latest update: 03/19/2025
# Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.
BGRED="\e[1;97;41m"
ENDCOLOR="\e[0m"
echo -e "${BGRED} ${ENDCOLOR}"
@jwbee
jwbee / jq.md
Last active March 20, 2025 08:05
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is