Skip to content

Instantly share code, notes, and snippets.

View yratof's full-sized avatar
🍊
Eating an orange

Andrew yratof

🍊
Eating an orange
View GitHub Profile
@yratof
yratof / plotting.md
Created August 8, 2019 07:24
HPGL Plotting
@yratof
yratof / function_gutenberg.php
Last active July 6, 2019 15:23
Wrap gutenberg elements, because we don't want floating <p> elements
<?php
/*
Wrap Gutenberg blocks in a custom wrapper
.block-is-wrapped is for general use
*/
function gutenberg_block_wrapper( $block_content, $block ) {
// No block name? Most likely doesn't exist
if ( NULL === $block['blockName'] ) {
@yratof
yratof / shitty.scd
Created October 19, 2018 00:59
Worst fucking synth ever
(
s.waitForBoot({
(
s.sync;
(
SynthDef("shittySy",{
arg out=0;
Out.ar(out,
@yratof
yratof / .scl
Created October 16, 2018 19:56
sup
(
s = Server.default;
s.options.memSize_(2.pow(10)); // 512mb of Memory
s.options.numAnalogInChannels = 8;
s.options.numAnalogOutChannels = 8;
s.options.numDigitalChannels = 16;
@yratof
yratof / DigitalIn.scd
Created October 16, 2018 14:06
DigitalIn for Supercollider
(
~ctrl = {
var d0 = DigitalIn.ar(0); // Button on pin D0, set to 0 state then 1 when pressed
SendReply.kr(Impulse.kr(10), '/ctrl', [d0]); // Pulse, symbol, [data]
}.play;
x = {
arg t_trig=0, t_freq=440;
@yratof
yratof / printer.json
Created October 6, 2018 19:43
a8 printer
{
"layer_height": "0.125",
"wall_thickness": "2",
"nozzle_size": "0.4",
"bottom_thickness": "0.125",
"filament_diameter": "1.75",
"filament_flow": "135",
"solid_top": "1",
"solid_bottom": "1",
"solid_layer_thickness": "0.8",
@yratof
yratof / spher.hpgl
Last active October 6, 2018 20:11
plot this
This file has been truncated, but you can view the full file.
IN;PU;
IN;
PA3843,8592;
PD;
PA3865,8595;
PU;
PA2906,8446;
PD;
PA2958,8454;
PU;
@yratof
yratof / iceland-sm_optimal.hpgl
Created July 14, 2018 22:14
iceland optimal
This file has been truncated, but you can view the full file.
IN;PU;
IN;
PA5907,47;
PD;
PA5908,45,5909,43,5910,41,5911,39,5912,37,5913,35,5914,34,5914,33,5915,32,5915,31,5916,31,5916,30,5916,29,5917,28,5917,27,5917,26,5918,25,5918,24,5918,23,5918,22,5918,21,5919,21,5919,20,5919,19,5919,18,5918,17,5918,16,5918,15,5918,14,5918,13,5918,12,5917,12,5917,11,5917,10,5916,9,5915,8,5915,7,5914,7,5914,6,5913,6,5912,5,5911,4,5910,4,5910,3,5909,3,5908,3,5908,2,5907,2,5906,2,5905,2,5904,2,5904,1,5903,1,5902,1,5901,1,5901,2,5900,2,5899,2,5898,2,5897,2,5897,3,5896,3,5895,3,5894,4,5893,4,5892,5,5891,5,5891,6,5890,6,5890,7,5889,7,5889,8,5888,9,5887,10,5886,11,5886,12,5886,13,5885,13,5885,14,5885,15,5885,16,5884,16,5884,17,5884,18,5884,19,5884,20,5884,21,5884,22,5884,23,5884,24,5884,25,5885,25,5885,26,5885,27,5886,27,5886,28,5887,29,5888,30,5888,31,5889,32,5890,33,5890,34,5891,34,5892,35,5892,36,5893,37,5894,37,5895,38,5897,39,5898,40,5899,41,5900,42,5901,42,5903,44,5905,45,5907,47;
PU;
PA6019,56;
PD;
PA6019,50;
PU;
This file has been truncated, but you can view the full file.
IN;PU;
IN;
PA5407,41667;
PD;
PA5490,41643;
PU;
PA18369,41667;
PD;
PA18310,41655;
PU;
IN;PU;SP1;
IN;
PA7828,5748;
PD;
PA7420,5748,7561,5608,7901,5691,7828,5748;
PU;
PA7828,5748;
PD;
PA7420,5748,7561,5608,7901,5691,7828,5748;
PU;