Skip to content

Instantly share code, notes, and snippets.

View matthewkcarr's full-sized avatar

Matthew Carr matthewkcarr

View GitHub Profile
@matthewkcarr
matthewkcarr / Cracks_v5
Last active August 29, 2015 13:56
processing - cracks - slight edit will give tree leaves or a bridge.
int currMouseX;
int currMouseY;
int x_screen_size = 200;
int y_screen_size = 200;
//to use this look at
//http://www.processing.org/discourse/beta/num_1233971698.html
static CGeometry Geom = CGeometry.getInstance();
@matthewkcarr
matthewkcarr / mini_magick_example.rb
Created August 29, 2012 16:51
using mini magick to add padding of white centered around an image
image = MiniMagick::Image.open('./ex-image.jpg')
image.combine_options(:convert) do |c|
c.extent('600x')
c.gravity('center')
c.background('white')
end
image.write('shaweet.jpg')