Skip to content

Instantly share code, notes, and snippets.

@moxuse
moxuse / control-effects-midi-guy-sound-module.scd
Last active August 22, 2023 05:09
Control Effects of MIDI Guy sound module

// Control Effects MIDI Guy sound module // https://github.com/kinoshita-lab/MIDI-guy/

// Orca code

.......................................... ....4Uw..R....6Uq..Rt...2Uq..Rt........... ......:022cf....:112af....:731af.......... .......................................... ..........................................

@joshsusser
joshsusser / mandel.rs
Created March 20, 2018 05:19
mandelbrot renderer - my first Rust program
extern crate image;
extern crate num_complex;
use std::fs::File;
use image::{ImageBuffer, Luma};
use num_complex::Complex;
fn main() {
// for a 3 x 2 image: (-2,-1) to (1,1)
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@olih
olih / jq-cheetsheet.md
Last active May 15, 2024 22:26
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@dublx
dublx / retry.sh
Last active April 3, 2023 10:38
Bash - retry command N times
#!/bin/bash
set -euo pipefail
function myFunction() {
myCommand
return $?
}
retry=0
maxRetries=5
#!/usr/bin/env node
var suncalc = require('suncalc');
var phase = suncalc.getMoonIllumination(new Date()).phase;
var phases = [
"🌑",
"🌒",
"🌓",
"🌔",
"🌕",
if (!HTMLVideoElement.prototype.canPlayType) {
HTMLVideoElement.prototype.canPlayType = function(type) {
return [
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@rochal
rochal / plasma.js
Created May 30, 2012 23:07
plasma.js - Creating Plasma Fractal in JavaScript
/***************************************************************************
* Do What THe Fuck You Want To Public Licence 2 *
* *
* JavaScript implementation by Piotr Rochala (http://rocha.la/) *
* Based on C# work of Serge Meunier (http://www.smokycogs.com/) *
* *
* Check this code in action on http://rocha.la/javascript-plasma-fractal *
* *
**************************************************************************/