Skip to content

Instantly share code, notes, and snippets.

View tomstuder's full-sized avatar
🎯
Focusing

Tom Studer tomstuder

🎯
Focusing
View GitHub Profile
@tomstuder
tomstuder / rgb2hex.js
Created June 3, 2016 11:36
How can i convert rgb to hex in p5?
// 15538: Uncaught TypeError: Cannot read property 'toString' of undefined
function setup() {
createCanvas(400,400);
background(100);
}
function draw() {
// var s = second();
// var shex= color(map(s,0,59,0,100));
@tomstuder
tomstuder / gist:298396022314ead1106235e090bb76d3
Created May 23, 2016 22:56
Example of using foreach with a multidimensional array
<?php
$posts = array (
array (
title => "First Post",
author => "Tom Studer",
category => "design",
post => "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Neque in fugit rem dolore exercitationem saepe. Velit nemo tempora, repudiandae eveniet assumenda. Beatae debitis modi id dolorum molestias repudiandae culpa neque."
),
array (
@tomstuder
tomstuder / build.pde
Created September 13, 2013 20:09
attempting 2 color variable sets, and 2 HShapeLayouts in processing.
HDrawablePool pool;
HColorPool colors;
void setup(){
size(600,600);
H.init(this).background(#202020);
smooth();
colors = new HColorPool(#FFFFFF, #F7F7F7, #ECECEC, #333333, #0095a8, #00616f, #FF3300, #FF6600);
colorsb = new HColorPool(#E2E2E2, #C2c2c2, #C3c3a2);