Skip to content

Instantly share code, notes, and snippets.

View slambert's full-sized avatar

Steve Lambert slambert

View GitHub Profile
/**
* ControlP5 Knob - modified by Steve
*
*
* find a list of public methods available for the Knob Controller
* at the bottom of this sketch.
*
* by Andreas Schlegel, 2012
* www.sojamo.de/libraries/controlp5
*
@slambert
slambert / modulo ring points.pde
Created April 25, 2018 15:37
modulo and ring of points working together
float radius=200;
int numPoints=4;
void setup(){
size(500,500);
}
void draw () {
if(frameCount % 15 == 1){
numPoints = frameCount % 270;
@slambert
slambert / shuffler.sh
Created April 17, 2018 23:41
This script shuffles the lines of a text file, and then shows a line from that file, one by one, each time it's run.
#!/bin/sh
# Shuffler Bash Script
# Steve Lambert 2018-04-16
# This script shuffles the lines of a text file, and then shows
# a line from that file, one by one, each time it's run.
# To use this script, create a config file at ~/.shufflerVar
# This will hold variables that the script can call each time
# it's run.
@slambert
slambert / valentimes-special-for-while.pde
Created February 14, 2018 17:10
for and while loop demo 2018
/*
/ Steve Lambert February 14, 2018
/ Valentimes!
/ for and while loop demo v1
*/
color romanceRed = color(196,10,10);
color cupidPink = color(255,129,129);
void setup() {
@slambert
slambert / class-example-2-2018-02-07.pde
Created February 7, 2018 17:36
/* If/then, click and drag, variable, || etc v0.1
/* If/then, click and drag, variable, || etc v0.1
Steve Lambert February 7, 2018
todo:
gravity
*/
color darkBlue = color(34, 83, 120);
color medBlue = color(22, 149, 163);
color lightBlue = color(172, 240, 242);
@slambert
slambert / class-example-1-2018-02-07.pde
Created February 7, 2018 15:17
Color Palette example sketch includes examples of: boolean variables if/else mousepressed relational operators (> < == !--)
/*
Color Palette example sketch
includes examples of:
boolean variables
if/else
mousepressed
relational operators (> < == !--)
Steve Lambert February 7, 2018
*/
@slambert
slambert / Animation without gifs
Created April 26, 2017 16:52
This animates a sequence of images without an animated gif library. Basically stealing from the sequential example on processing.org
/* Animated with no library demo
Steve Lambert April 26, 2017
*/
// https://processing.org/examples/sequential.html
int numFrames = 4; // The number of frames in the animation
int currentFrame = 0;
PImage[] images = new PImage[numFrames];
@slambert
slambert / bad word checker.pde
Created April 26, 2017 14:58
Tests a word against a list of words
/* Bad Word Checker
Tests a word against a list of words
Better put: tests a string against an array of strings
Steve Lambert April 26, 2017
*/
// VARIABLES
String filename = "wordlist.txt"; // file with words to check against
String[] lines; // array of the lines in the file
@slambert
slambert / very expensive network connection checker.pde
Created April 26, 2017 13:43
This uses processing to see if you're currently connected to the internet.
/* Very expensive network connection checker
Steve Lambert 2017-04-26
*/
void setup() {
size(250,250);
smooth();
} // end setup
@slambert
slambert / XML Demo.pde
Created April 20, 2017 15:42
This is a very short Processing.org program that simply pulls news headlines from the NYT and puts them into an array.
/*
XML exploration v.01
Steve Lambert
April 20, 2017
This is a very short program that simply pulls news headlines from the NYT and puts them
into an array.
I'd never done this before yesterday. Granted, I had some previous knowledge of RSS/XML,
but I decided just to see how far I could get in 15 minutes of research and experimenting