Skip to content

Instantly share code, notes, and snippets.

@brycec
brycec / slik.rb
Created February 3, 2022 17:25
#beats
use_bpm 70
use_random_seed 613
rhy = (ring 1, 1.5, 0.5, 1)
chr = (scale :e2, :chinese).pick 4
live_loop :kik do
sample :bd_808, amp: 1.99
sleep rhy.tick
end
@brycec
brycec / 1.rb
Created November 13, 2021 21:05
#beats
use_bpm 60
use_random_seed 13
rhy = (ring 0.75, 0.75, 1, 0.75, 0.75)
with_fx :reverb, mix: 0.2, room: 0.6 do
live_loop :kick do
sample :bd_tek, beat_stretch: 0.3, amp: 2
sleep rhy.tick
end
@brycec
brycec / lines.pde
Last active January 26, 2019 13:25
Rotating 3D lines
void setup() {
w=screen.width;
h=screen.height,
size(w,h,P3D);
noStroke();
}
void draw() {
lights();
@brycec
brycec / boids.pde
Created January 26, 2019 11:10
rainbow boids in processing
float[][] p = new float[300][4];
void setup() {
w=screen.width-1;
h=screen.height-80;
size(w,h);
acc=0.0006;
for(i=0;i<p.length;i++){
p[i][0] = random(0,w);
p[i][1] = random(0,h);
p[i][2] = 0;
@brycec
brycec / life.pde
Last active January 24, 2019 16:04
Flower planet in processing 3d
void setup() {
w=screen.width;
h=screen.height-60;
size(w,h);
background(0);
loadPixels();
colorMode(HSB);
}
@brycec
brycec / staticMixin.js
Created August 15, 2013 18:24
wasted spacetime
/**
* @mixin
* Mixin static functionality to a magnet
**/
define(function () {
return {
/**
* Get the visibility types for a magnet
* @return {object} an object with keys of types to their values
**/
@brycec
brycec / robot.js
Created December 4, 2012 00:57
run n gun
//FightCode can only understand your robot
//if its class is called Robot
var friends = {}, id;
var Robot = function(robot) {
id = robot.id;
// friends is the set all friendly robots
friends[id] = id;
clone = robot.clone();
@brycec
brycec / LICENSE.txt
Created August 21, 2012 00:11 — forked from 140bytes/LICENSE.txt
dom builder
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@brycec
brycec / sidebarshadow.m
Created July 24, 2012 23:53
sidebar shadow fix
- (void)moveMainViewToPosition:(CGFloat)position
{
[self moveShadowForViewAtPosition:position];
CGRect frame = self.mainView.frame;
frame.origin.x = position;
self.mainView.frame = frame;
}
@brycec
brycec / party.js
Last active October 6, 2015 21:38
let's party
javascript:setInterval(function(){document.body.style.backgroundColor='hsl('+parseInt(Math.random()*255)+',100%,50%)';},50))