Skip to content

Instantly share code, notes, and snippets.

View brianfay's full-sized avatar

Brian Fay brianfay

View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@masak
masak / explanation.md
Last active June 19, 2025 13:01
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@44kwm20
44kwm20 / 暴れ太鼓.sc
Last active January 24, 2016 14:37
1つ、もしくは2つ以上のサンプルをテンポによって切り分け、それっぽく分解したりエフェクトをかけたりして再生します。
//////////
// 説明
// 1のカッコを実行 > 2にてサンプルのパス、ビートの長さ、音量、確率を入力 >
// 2のカッコを実行 > 3のbpmを設定 > 3のカッコを実行
//
// - 2について -
//・ループさせたいサンプルについて、ビートの長さは4分音符分を"1"とし計算。4/4一小節分は"4"になります。
//・ワンショットで鳴らしたいサンプルについて、ビートの長さを"0"にしてください。
//・確率の部分は「合計して100にする」と言った事は必要ありません。単純に他のサンプルとの比率を記入して下さい。
//
@staltz
staltz / introrx.md
Last active August 15, 2025 20:30
The introduction to Reactive Programming you've been missing
@jkrems
jkrems / generators.md
Last active February 24, 2020 19:09
Generators Are Like Arrays

In all the discussions about ES6 one thing is bugging me. I'm picking one random comment here from this io.js issue but it's something that comes up over and over again:

There's sentiment from one group that Node should have full support for Promises. While at the same time another group wants generator syntax support (e.g. var f = yield fs.stat(...)).

People keep putting generators, callbacks, co, thunks, control flow libraries, and promises into one bucket. If you read that list and you think "well, they are all kind of doing the same thing", then this is to you.

@bhauman
bhauman / core.cljs
Last active August 16, 2022 12:08
Helpful patterns when developing with ClojureScript Figwheel and Express js
(ns todo-server.core
(:require
[cljs.nodejs :as nodejs]
[figwheel.client :as fw]))
(nodejs/enable-util-print!)
(defonce express (nodejs/require "express"))
(defonce serve-static (nodejs/require "serve-static"))
(defonce http (nodejs/require "http"))
@miguel-negrao
miguel-negrao / synthdef.ipynb
Created November 18, 2015 09:35
synthdef binary parsing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@44kwm20
44kwm20 / ClappingMusic.sc
Last active May 27, 2020 23:14
Clapping Music by Steve Reich (in SuperCollider)
////////////////////////////
// SynthDef ////////////////
////////////////////////////
(
SynthDef(\clap,{
arg output=0, vari=0, acc = 1;
var noiz, amp, filt1, filt2, aEnv, fEnv, tap;
noiz = WhiteNoise.ar;
aEnv = EnvGen.kr(Env.perc(0.01, 0.4, 1, -10).delay(Rand(0,0.02)), 1, doneAction:2);
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter

These are instructions for building a stand alone, headless, music computer based on the Pisound audio card and a RaspberryPi 3.

I use this set up in my live performance rig where it does all of the following without breaking a sweat:

  • Audio effects
  • stutter gate (beat sync'd)