Skip to content

Instantly share code, notes, and snippets.

View camb416's full-sized avatar

Cameron Browning camb416

View GitHub Profile
import processing.core.PApplet;
import processing.core.PGraphics;
/**
* Created by cbrowning on 2/17/16.
*/
//public class ProcessingExample extends PApplet{
PGraphics tile;
int tileWidth;
import processing.core.PApplet;
import processing.core.PGraphics;
/**
* Created by cbrowning on 2/17/16.
*/
public class ProcessingExample extends PApplet{
PGraphics tile;
int tileWidth;
@camb416
camb416 / renamer.sh
Created February 19, 2016 17:41
rename all of the JPG images in this folder to sequence numbers.
#!/bin/bash
# rename all of the JPG images in this folder to sequence numbers.
a=1
for i in *.jpg; do
new=$(printf "%05d.jpg" "$a") #04 pad to length of 5 digits
mv -- "$i" "$new"
let a=a+1
done
@camb416
camb416 / sliceProgressively.sh
Created February 19, 2016 17:38
One week series. Slicing images from top to bottom over time.
#!/bin/bash
# One week series. Slicing images from top to bottom over time.
# http://cameronbrowning.com/content/one-week-series/
# Originally adapted from earlier work at:
# http://cameronbrowning.com/content/creating-slit-scan-images-from-quicktime-movies-with-ffmpeg-on-mac-os-x/
# Step 1: loop through 10,078 images
for i in `seq -f "%05g" 1 10078`;
do
# subtract 1 from the counter for the y offset
@camb416
camb416 / processing_ide.md
Last active February 17, 2016 21:42
Instructions on how to create a new processing project in IntelliJ IDEA Community 15

Processing 3.0 in IntelliJ IDEA 15

  • Create new project
  • Java
  • Next
  • Next
  • Finish
  • File > Project Structure
  • Libraries > +
  • /Applications/Processing.app/Contents/Java/core.jar
  • OK
/**
* Simple Swarmer 2
*
*/
int numAttractors = 256;
int numMasses = 8192*2;
float maxSpeed = 4.0f;
float maxAccel = 1.0f;
@camb416
camb416 / sketch_160202b
Created February 2, 2016 23:01
simpleSwarmer.pde
/**
* Simple Swarmer
*
*/
int numAttractors = 256;
int numMasses = 4096;
Attractor[] a = new Attractor[numAttractors];
@camb416
camb416 / grabAllTheCameras.sh
Created January 29, 2016 23:06
Grab all the NYC DOT Traffic camera images and make a contact sheet with imagemagick
#!/bin/bash
wget http://207.251.86.238/cctv261.jpg
wget http://207.251.86.238/cctv254.jpg
wget http://207.251.86.238/cctv490.jpg
wget http://207.251.86.238/cctv263.jpg
wget http://207.251.86.238/cctv644.jpg
wget http://207.251.86.238/cctv696.jpg
wget http://207.251.86.238/cctv722.jpg
wget http://207.251.86.238/cctv200.jpg
wget http://207.251.86.238/cctv31.jpg
@camb416
camb416 / traffic-cameras.json
Last active June 23, 2016 08:05 — forked from kuanb/traffic-cameras.json
All traffic camera locations in NYC
[{
"lat": "40.79142677512476",
"lng": "-73.93807411193848",
"name": "1 Ave @ 110 St",
"camera": "http://207.251.86.238/cctv261.jpg"
}, {
"lat": "40.800426144169315",
"lng": "-73.93155097961426",
"name": "1 Ave @ 124 St",
"camera": "http://207.251.86.238/cctv254.jpg"
int mod;
void setup(){
mod = 1;
size(600,600);
}