Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active July 25, 2024 08:00
The introduction to Reactive Programming you've been missing
@rygorous
rygorous / vr_urgh.txt
Last active September 6, 2022 21:35
What I mean when I say "I think VR is bad news".
This just got linked to by the Y combinator news account, without proper context,
so a brief introduction: A month ago (end of May / early June 2014) I had a
Twitter conversation with a bunch of acquaintances. One tweet in the middle
of that thread, with obligatory hyperbole, was me saying that I think VR is
bad news.
Well, that part of the thread (but not the rest that provides context) recently
got retweeted, and then someone asked me if I could explain what I mean by that,
and because Twitter is a great platform for delivering 140 character slogans and
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer:
@jcdickinson
jcdickinson / colorblind.glsl
Last active April 28, 2024 23:27
Colorblind Simulation Shader
/*-----------------------------------------------------------.
/ ColorBlind correction /
'-----------------------------------------------------------*/
// Daltonize (source http://www.daltonize.org/search/label/Daltonize)
// Modified to simulate color blindness.
float4 Daltonize( float4 input, float2 tex )
{
// RGB to LMS matrix conversion
float3 L = (17.8824f * input.r) + (43.5161f * input.g) + (4.11935f * input.b);
float3 M = (3.45565f * input.r) + (27.1554f * input.g) + (3.86714f * input.b);
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active July 23, 2024 07:09
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
@pragmaticlogic
pragmaticlogic / node-apps-startup.sh
Last active September 4, 2020 14:58
node-apps-startup.sh
#!/bin/bash
#
# An init.d script for running a Node.js process as a service using iptables, forever and bouncy
# Reference:
# 1- https://github.com/nodejitsu/forever
# 2- https://www.exratione.com/2013/02/nodejs-and-forever-as-a-service-simple-upstart-and-init-scripts-for-ubuntu/
source /home/kle/.nvm/nvm.sh
NAME="Script for all NodeJS apps"
NVM_VERSION="v0.10.31"
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///
@t0chas
t0chas / CustomEditorBase.cs
Last active March 5, 2024 16:47
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@PostEpoch
PostEpoch / ResizeReorderableListExample.cs
Last active December 19, 2018 08:32 — forked from p-groarke/ResizeReorderableListExample.cs
Resize Unity Reorderable List example.
// Originally from MALQUA
// https://feedback.unity3d.com/suggestions/custom-element-size-in-reorderable-list
// http://i.imgur.com/fIbBorr.gifv
// and SOCAPEX
// https://gist.github.com/Socapex/1d9b45507464681d530b
// Modified by Jesse Hamburger
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;

For Hannah

Your creative output spans several disciplines - a big reason why I enjoy your work - while a goal of yours is preventing multi-tasking. Can you define what unproductive multi-tasking looks like to you vs. what have you found to be a productive way to shift your focus from one discipline to another?

It comes down to scope and granularity. The ideal focused work to me is a session of 25:00 pomodoro. Undistracted, focusing on a single task, with a single tool, undisturbed. Then, throughout the day, the relationship between each of the pomodoros, would be done for a singular project.

An unproductive multi-tasking day, would include interrupted sessions of pomodoros, over multiple unrelated projects.

In your tracking, I like that you differentiate between focused input, like listening to music, and output, like performing music. How do you decide what is an appropriate output of something you are curious about and what's your process like to allocate the right about time towards it?

@eelfroth
eelfroth / circles.pde
Last active September 9, 2018 16:42
circle fractal generator
// this is Processing source code
// get the IDE at processing.org
// and type in this little program
// tweak the numbers to explore...
float S = 1; //step
float W = 10; //weight
float A = 255; //alpha
float R = PI/3; //rotation
float M = 0; //modulo