Skip to content

Instantly share code, notes, and snippets.

View AnanthVivekanand's full-sized avatar

Ananth V. AnanthVivekanand

View GitHub Profile
@AnanthVivekanand
AnanthVivekanand / Snake_arduboy.ino
Created March 15, 2019 18:30
A basic implementation of the game "snake" on an arduboy.
#include <Arduboy2.h>
Arduboy2 arduboy;
boolean gameStarted = false;
int x, y;
byte snake[11][2];
byte last_move;
@AnanthVivekanand
AnanthVivekanand / explanation.md
Last active August 7, 2019 18:24
Basic sound synth using SDL_audio, with some examples of frequency manipulation on a sine wave.
	SDL_Init(SDL_INIT_AUDIO);
	SDL_AudioSpec spec, aspec;
	SDL_zero(spec);
	spec.freq = 48000; //declare specs
	spec.format = AUDIO_S16SYS;
	spec.channels = 1;
	spec.samples = 4096;
	spec.callback = callback;
	spec.userdata = NULL;
def tick args
defaults args
render args
calc args
inputs args
end
def defaults args
args.state.arr1 ||= ['Cat1', 'Cat2', 'Cat3', 'Cat4']
args.state.arr2 ||= ['Dog1', 'Dog2', 'Dog3', 'Dog4']
cmd + alt + ctrl - s : yabai -m space --focus recent
cmd + alt + ctrl - b : yabai -m space --balance
cmd + alt + ctrl - f : yabai -m window --toggle float
cmd + alt + ctrl - m : yabai -m window --grid 1:1:0:0:1:1
cmd + alt + ctrl - x : yabai -m space --layout bsp
cmd + alt + ctrl - z : yabai -m space --layout float