Skip to content

Instantly share code, notes, and snippets.

View drfuzzyness's full-sized avatar

Matthew Conto drfuzzyness

View GitHub Profile
@DanB91
DanB91 / README.txt
Last active November 28, 2022 04:57
Playdate Zig starting point
THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate:
https://github.com/DanB91/Zig-Playdate-Template
The rest of this is preservied for historical reasons:
This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform.
This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware.
@nokidding
nokidding / updateNpm.bat
Created March 31, 2020 13:08
Windows batch file which updates npm for nvm-windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
/*
Dimitre Lima 2019
Uncompressed tiff writer for openFrameworks
Only for RGB888 big Endian
*/
class tiffFastWriter {
public:
@peacefixation
peacefixation / lerp-rgb.js
Last active August 1, 2023 10:01
Linear interpolate RGB colors
// interpolate between colors { r, g, b } where 0 < t < 1
// when assigning a color for a number in a range larger than 0-1, scale the number to the 0-1 range first
function lerpRGB(color1, color2, t) {
let color = {};
color.r = color1.r + ((color2.r - color1.r) * t);
color.g = color1.g + ((color2.g - color1.g) * t);
color.b = color1.b + ((color2.b - color1.b) * t);
return color;
}
@aers
aers / count_loaded_refs_in_load_order.pas
Created January 15, 2019 04:40
xedit count loaded refrs in load order
Unit CountLoadedRefs;
Var
giTemporaryCount: Integer;
giPersistentCount: Integer;
giPluginTemporaryCount: Integer;
giPluginPersistentCount: Integer;
Const
gtPersistent = 8;
@KrabCode
KrabCode / src_MainApp.java
Last active November 27, 2018 09:46
Tessellated spheres source in IntelliJ IDEA - to run this in the vanilla Processing IDE just remove everything that mentions MainApp including the "class MainApp extends PApplet" part and you're golden - also you'll need the PostFX and PeasyCam libraries found in Tools -> Add tool.
import ch.bildspur.postfx.builder.PostFX;
import peasy.PeasyCam;
import processing.core.PApplet;
import processing.core.PShape;
import processing.core.PVector;
import processing.opengl.PShader;
import java.util.ArrayList;
public class MainApp extends PApplet {
/*
Copyright (c) 2018 Pete Michaud, github.com/PeteMichaud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@steven2358
steven2358 / ffmpeg.md
Last active May 5, 2024 12:45
FFmpeg cheat sheet
@shivshank
shivshank / vox_to_obj_exporter.py
Last active December 31, 2023 01:12
Exports from MagicaVoxel VOX to OBJ. Can preserve all edges for easy editing in a program like Blender.
"""
This script is designed to export a mass amount of MagicaVoxel .vox files
to .obj. Unlike Magica's internal exporter, this exporter preserves the
voxel vertices for easy manipulating in a 3d modeling program like Blender.
Various meshing algorithms are included (or to be included). MagicaVoxel
uses monotone triangulation (I think). The algorithms that will (or do)
appear in this script will use methods to potentially reduce rendering
artifacts that could be introduced by triangulation of this nature.
@vhugo
vhugo / cf-ddns.sh
Last active November 19, 2022 19:37 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh