Skip to content

Instantly share code, notes, and snippets.

@shanecelis
shanecelis / DragManipulator.cs
Last active August 5, 2025 01:23
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 July 17, 2025 06:34
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 June 23, 2025 08:52
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 February 15, 2021 16:07
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
@nkbt
nkbt / .eslintrc.js
Last active July 21, 2025 17:55
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {