Skip to content

Instantly share code, notes, and snippets.

@ptrv
ptrv / satellites_alt.scd
Created July 18, 2011 17:52
satellite_sound experiments
//http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Level-meter-disappearing-td2714612.html
(
SynthDef(\bell, { |amp = 0.1, out = 0, azim=30, elev=1,id=10,noisy=22|
var freq = id.linexp(1,30,200,800);
var vol_id = id.linlin(1,20,0.6,0.3);
// var xVal = noisy.linexp(0, 50, 1000, 10000);
// var yVal = elev.linexp(0, 40, 1000, 10000);
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@willurd
willurd / web-servers.md
Last active November 13, 2024 13:44
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@emsk
emsk / guitarSound.sc
Created November 18, 2013 14:59
シリアルポートから取得した加速度データによって音を鳴らす
/*
Receive sensor data and play guitar sound.
- Mac OS X 10.6.8 Snow Leopard
- SuperCollider 3.6.5
- LilyPad Arduino USB ... https://www.sparkfun.com/products/11190
- FLORA Accelerometer (LSM303) ... http://www.adafruit.com/products/1247
*/
// 1. boot
@XVilka
XVilka / TrueColour.md
Last active November 18, 2024 16:13
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@Akkiesoft
Akkiesoft / minimal-raspbian2-X.sh
Last active May 20, 2018 07:20
コンパクトなRaspbianを作るやつをベースに自己流にアレンジしたもの。RaspbianがXありで1.2GBちょいのディストリに変身します。NOOBS1.3.4のRaspbianに対応。
#/bin/bash
# コンパクトなRaspbianを作るやつをベースに自己流にアレンジしたもの
# Xもいらないバージョン: https://gist.github.com/Akkiesoft/9873563
#
# ベース: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/
# 前のバージョン: https://gist.github.com/Akkiesoft/5426660
sudo apt-get update
rm -rf python_games ocr_pi.png
@yitsushi
yitsushi / EventSystem.js
Created May 6, 2014 09:52
EventSystem that I use with React.js to communicate between components
var EventSystem = (function() {
var self = this;
self.queue = {};
return {
publish: function (event, data) {
var queue = self.queue[event];
if (typeof queue === 'undefined') {
@ALOUT
ALOUT / amenGlitches.scd
Created June 1, 2014 11:40
amen Glitchテンプレート
// @phrontist
// https://soundcloud.com/phrontist/lazy-amen-break-glitches
s.reboot;
s.stop;
~amen = Buffer.readChannel(s,"/Applications/SuperCollider/sounds/fools_gold.wav", channels:[0,0]);
SynthDef(\loop, {| out = 0, bufnum = 0, gate = 1, pos = 0, speed = 1, freq = 0, endfreq = 0.001, sustain, wobble = 1, boost = 1|
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note