Skip to content

Instantly share code, notes, and snippets.

View briansorahan's full-sized avatar
🎯
Focusing

Brian Sorahan briansorahan

🎯
Focusing
View GitHub Profile
@dqgorelick
dqgorelick / tidal_server.scd
Last active April 11, 2024 19:18
tidal server simple

SuperDirt.start // start server

Server.killAll // kill server

Quarks.gui // open samples folder

// set inputs & outputs // you will need to kill the server and restart when changing the input / output

// list all devices:

@jarmitage
jarmitage / tidal-multi-stream.hs
Created October 5, 2019 23:31
Multiple Tidal streams to multiple OSCTargets
-- https://tidalcycles.org/index.php/Custom_OSC
:set -XOverloadedStrings
:set prompt ""
:set prompt-cont ""
import Sound.Tidal.Context
superDirt <- startTidal (superdirtTarget {oLatency = 0.1, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cFrameTimespan = 1/20})
@duaneg
duaneg / Modules.mk
Last active May 8, 2017 16:16
GNU Make modular makefile framework
#***********************************************************************
#
# Build system module framework
#
# Copyright (c) 2014 Process Systems Enterprise Ltd
#
# Licensed under GPL v3+
#
# This makefile provides definitions which allow use of a modular build system,
# where "module" makefiles are isolated from each other. Variables defined in a
@dmitshur
dmitshur / gist:6927554
Last active July 14, 2024 16:13
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 22, 2024 23:19
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@jboner
jboner / latency.txt
Last active July 23, 2024 08:41
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD