Skip to content

Instantly share code, notes, and snippets.

@alvinsng
alvinsng / no-use-effect.md
Created March 17, 2026 20:00
Skill generated by Factory Droid
name no-use-effect
description Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch.

No useEffect

@shanecelis
shanecelis / DragManipulator.cs
Last active October 7, 2025 17:55
This manipulator makes a visual element draggable at runtime in Unity's UIToolkit.
/* Original code[1] Copyright (c) 2022 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://gist.github.com/shanecelis/b6fb3fe8ed5356be1a3aeeb9e7d2c145
[2]: https://twitter.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/
using UnityEngine;
using UnityEngine.UIElements;
@suda
suda / keybindings.json
Created December 16, 2018 11:44
VSCode Mac keybindings for Linux/Windows
// Overwrite key bindings by placing them into your key bindings file.
[
{
"key": "escape escape",
"command": "workbench.action.exitZenMode",
"when": "inZenMode"
},
{
"key": "shift+escape",
"command": "closeReferenceSearchEditor",
@jzayed
jzayed / GlowLevels.shader
Created May 11, 2018 10:51
Glow Levels Shader
Shader "Sprites/GlowLevels"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_AlphaIntensity_Fade_1("_AlphaIntensity_Fade_1", Range(0, 3)) = 1
_TintRGBA_Color_1("_TintRGBA_Color_1", COLOR) = (1,1,1,1)
_AlphaIntensity_Fade_2("_AlphaIntensity_Fade_2", Range(0, 3)) = 1
_TintRGBA_Color_2("_TintRGBA_Color_2", COLOR) = (1,1,1,1)
-- eval the functions below first, then you can do this:
midiInstrument $ (|+| note "45") $ mel m9 5 "0*8"
-- above, plays the first 5 notes of a m9 arpeggio, over a pattern of eighth notes,
-- starting at MIDI note #45
-- the "mel" function below relies on a "scramble" function which I don't
-- really like. I'm not good enough at haskell to know to how pick
-- random values out of the scale/arpeggio.
@bishboria
bishboria / springer-free-maths-books.md
Last active May 17, 2026 12:25
Springer made a bunch of books available for free, these were the direct links
@lennart
lennart / blinken.ino
Last active January 4, 2016 11:37
Lo-Fi Arduino Tidal binding, makes lights go on by color name.
/*
Tidal <-> Arduino
send rhythmic patterns to custom hardware
assumes three leds connected to Arduino on Digital Pins:
13 red
12 yellow
11 green
@nicholaswmin
nicholaswmin / catmull-rom.js
Last active January 13, 2026 19:59
catmull-rom
/* Catmull-Rom interpolating splines in ES6
----
authors: Nicholas Kyriakides (2017) & Unknown
from: "A class of local interpolating splines"
Catmull, Edwin; Rom, Raphael | University of Utah, 1974
Barnhill, Robert E.; Riesenfeld, Richard F. (eds.).
Computer Aided Geometric Design.
@summary
@robertsdionne
robertsdionne / deepdream-install.md
Last active March 18, 2026 23:00
Deepdream installation
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install