Skip to content

Instantly share code, notes, and snippets.

@creaktive
creaktive / mandelbrot.frag
Created March 25, 2021 15:18
Mandelbrot set plot, implemented as GLSL fragment shader
// shamelessly stolen from https://p5js.org/reference/#/p5/loadShader
// ported to work with https://thebookofshaders.com/edit.php
precision highp float;
const int I = 500;
void main() {
vec2 vPos = gl_FragCoord.xy;
vec2 p = vec2(-0.74364388703, 0.13182590421);
float r = .00001;
vec2 c = p + vPos * r, z = c;
float n = 0.0;
find ~/.local/share/Modartt/Pianoteq/Archive/ -type f -name \*.mid | sort | perl -MYAML::XS -nE 'if ( m{(\d{4}-\d{2}-\d{2}).+?(\d+)\s+notes,\s+(\d+)\s+seconds} ) { $s{$1}{notes} += $2; $s{$1}{minutes} += $3 / 60 } else { die } }{ say Dump \%s'
@creaktive
creaktive / 0_reuse_code.js
Created October 11, 2013 18:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Stanislaws-MacBook-Pro:~ fpbruzan$ curl -kL http://install.perlbrew.pl | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 315 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 1022 100 1022 0 0 314 0 0:00:03 0:00:03 --:--:-- 5161
## Download the latest perlbrew
## Installing perlbrew
perlbrew is installed: ~/perl5/perlbrew/bin/perlbrew