Skip to content

Instantly share code, notes, and snippets.

@simonw
simonw / Dockerfile
Last active December 17, 2023 21:00
The Dockerfile used by the new Datasette Publish to generate images that are smaller than 100MB
FROM python:3.6-slim-stretch as csvbuilder
# This one uses csvs-to-sqlite to compile the DB, and then uses datasette
# inspect to generate inspect-data.json Compiling pandas takes way too long
# under alpine so we use slim-stretch for this one instead.
RUN apt-get update && apt-get install -y python3-dev gcc
COPY *.csv csvs/
RUN pip install csvs-to-sqlite datasette
RUN csvs-to-sqlite csvs/names.csv data.db -f "name" -c "legislature" -c "country"
@mxactvtd
mxactvtd / TidalCyclesQuickReferenceStub.tidal
Last active March 8, 2024 21:19
TidalCycles Quick Reference compiled and partially rewritten documentation from various sources
---- TidalCycles QUICK REFERENCE ----
----------------------------------------------------------------
-- To use in your editor after or alongside your code for quick reference
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions
-- designed with atom - monokai one dark vivid as theme
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm
----------------------------------------------------------------
-- Some sources of Documentation --
-- https://tidalcycles.org/patterns.html
-- https://tidalcycles.org/functions.html
@munshkr
munshkr / Pdefc.sc
Created June 16, 2017 23:41
Pdefc / Pbindefc / Pkeyc classes
// Same as Pdef, but it collects last event on global `allEvents` dictionary
Pdefc : Pdef {
classvar <>allEvents;
*initClass {
allEvents = IdentityDictionary.new;
}
*new { arg key, item;
// Replace Pbind source for a Pcollect that stores
@pd3v
pd3v / waheffect.tidal
Last active April 19, 2021 17:02
Simulating a wah effect with TidalCycles
-- with @yaxu and @bgold help
d1 $ n "c5*8" # s "supersquare" # release "0.3"
# bandf (density 3 $ saw1 * (4500 * rand) + (100 * (density 1.0001 rand)))
# bandq "5.5"
# delay "0.9" # delaytime "0.15" # delayfeedback "0.5" -- some sonic sugar
-- this one is similiar to previous one, just adding harmonic richness by replacing one note (c5) with a chord (c5 major 7th)
d1 $ n "[c5,e5,g5,b5]*8" # s "supersquare" # release "0.3"
# bandf (density 3 $ saw1 * (4500 * rand) + (300 * (density 1.0001 rand)))
# bandq "5.5"
@bgold-cosmos
bgold-cosmos / synths.scd
Created January 25, 2017 21:28
SuperDirt synths (experimental)
(
var server = server ? Server.default;
var numChannels = ~dirt.numChannels;
var synthbuf = Buffer.alloc(server, server.sampleRate * 4, 1);
var recbuf = Array.fill(9, {|x| Buffer.alloc(server, server.sampleRate*4,1)});
SynthDef(\noop, {}).add;
// to try - square wave plus FM (bassy) with sawtooth LFO on LPF cutoff
// three octave saw detuned, pitch envelope sine LFO high cutoff filter
@Pitometsu
Pitometsu / .Xresources
Last active July 4, 2021 00:44
dotfiles
Xcursor.theme: ATER
! UI elements
Emacs.menuBar: 0
Emacs.toolBar: 0
Emacs.verticalScrollBars: off
! Font settings
Emacs.FontBackend: xft,x
Emacs.font: Inconsolata LGC-8.6
@guitarpickfm
guitarpickfm / ReadMe.md
Last active May 26, 2017 06:58
Audio Resources
@Arinerron
Arinerron / permissions.txt
Last active March 27, 2024 04:59
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"