Skip to content

Instantly share code, notes, and snippets.

@dmorgan-github
dmorgan-github / Pdv.sc
Last active March 2, 2023 04:00
SuperCollider mini dsl for durations and values
/*
NOTE: There is a Quark for this - https://github.com/dmorgan-github/Pdv
Copy to Extensions folder and re-compile
Ryhthmically sequences numeric values which can then be used with any event key, e.g. degree or midinote.
operators:
" " - empty space separates beats/values
~ - rest
@subrezon
subrezon / pop-win-dualboot.md
Created September 23, 2022 16:56
Dual boot Pop!OS + Windows 10/11 (very easy)

This tutorial will illustrate how to set up a dual boot Pop!OS + Windows 10/11 system very easily, without losing much disk space or installing not officially supported alternative boot loaders like GRUB or rEFInd.

The main issue with dual booting Pop!OS and Windows is that unlike most other distributions, Pop!OS uses the systemd-boot bootloader, which in its default configuration does not support loading kernels from partitions other than the EFI partition. Thus, Pop!OS requires the EFI partition to be at least 500 MiB in size, whereas the size of the EFI partition created during the installation of Windows is just 100 MiB. This would suffice for GRUB or rEFInd, since these bootloaders are able to load the kernel from the root partition, but not for systemd-boot. In this guide, we will perform a customized Windows installation with an enlarged EFI partition, and use that for a 100% default Pop!OS installation.

WARNING : this will not work on already existing installations of Windows or Pop!OS, you will hav

// Only pull a value once per clock time - else, return the previous value
PtimeClutch : FilterPattern {
var <>delta;
*new {
|pattern, delta=0.0|
^super.new(pattern).delta_(delta);
}
embedInStream {
@scztt
scztt / Pmod-tests.scd
Last active January 27, 2025 14:12
Pmod.sc
(
SynthDef(\saw, {
var env, sig;
sig = Saw.ar(
\freq.kr(440) * (\fmod.ar(0).midiratio * [-1, 1]),
\amp.kr(1)
);
env = Env.adsr(releaseTime: \release.kr(1));
env = env.kr(
SAMP : Singleton {
classvar <>root, <>extensions, <>lazyLoading=true;
var <paths, buffers, <channels, <foundRoot, <foundRootModTime, markersCache, atCache;
var sortFunc;
var metadata;
*initClass {
root = "~/Desktop".standardizePath;
extensions = ["wav", "aiff", "aif", "flac", "ogg"];
}
@jdarpinian
jdarpinian / executable.c
Last active April 2, 2025 15:41
Add one line to your C/C++ source to make it executable.
///$(which true);FLAGS="-g -Wall -Wextra --std=c17 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $FLAGS "$THIS_FILE" -o "$OUT_FILE" || exit $?;exec bash -c "exec -a \"$0\" \"$OUT_FILE\" $([ $# -eq 0 ] || printf ' "%s"' "$@")"
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
@adcxyz
adcxyz / Making_A_Standalone_w_3.7.0.scd
Created April 29, 2016 19:38
Making A Standalone with SC 3.7.0

/****

A full script for creating a standalone app based on the current setup and config of a SuperCollider.app - tested with 3.7.0.

c Alberto de Campo 2016

HOW TO USE this:

@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active May 6, 2025 19:44
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 2, 2025 08:14
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@mbinna
mbinna / include-version-info.sh
Last active November 12, 2021 20:59
Include Version Info from Git into Info.plist at build time
Add the script include-version-info.sh into a new run script build phase of your application target. The build phase
should be located after the build phase "Copy Bundle Resources".