Skip to content

Instantly share code, notes, and snippets.

Chris Riebschlager riebschlager

Block or report user

Report or block riebschlager

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@riebschlager
riebschlager / gist:8943083
Created Feb 11, 2014
Adding your public key to a server.
View gist:8943083
cat ~/.ssh/id_rsa.pub | pbcopy
paste into server's ~/.ssh/authorized_keys
@riebschlager
riebschlager / gist:9104428
Created Feb 20, 2014
Lumber Calculations
View gist:9104428
boardFeet = (boardThicknessInInches * boardWidthInInches * boardLengthInFeet) / 12
estimatedBoardFeet = (smallEndDiameterInInches + bigEndDiameterInInches) / 2 * lengthOfLogInFeet
View CircleGrid
PImage src;
int circleWidth = 13;
void setup() {
size(displayWidth, displayHeight);
background(0);
noStroke();
src = loadImage("src/UnionSta-KC Skyline.jpg");
//src.resize(width, height);
View gist:721c86ab8b498dd7b17f
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
numberOfSlices = 11;
source.loadImage("source.jpg");
source.resize(1920 * 2, 1080 * 2);
canvas.allocate(1920 * 2, 1080 * 2, GL_RGBA);
canvas.begin();
ofClear(0);
View weirdCircles
import toxi.color.*;
import toxi.geom.*;
import toxi.processing.*;
import java.util.*;
int num = 100;
float r;
int c;
PImage src;
PGraphics canvas;
View exploit
// http://labs.tineye.com/multicolr/rest/color_search/?limit=100&offset=0&colors[0]=73a1d2&colors[1]=d5c427&weights[0]=50&weights[1]=50
// http://img.tineye.com/flickr-images/?filepath=labs-flickr-public/images/3c/6872611445_3c927950b5_m.jpg&size=80
import java.util.*;
import java.net.*;
String baseUrl = "http://labs.tineye.com/multicolr/rest/color_search/?";
String baseImageUrl = "http://img.tineye.com/flickr-images/?filepath=labs-flickr-public/images/";
int pLimit = 200;
View LungsSymmetry.pde
ArrayList<Pathfinder> paths = new ArrayList<Pathfinder>();
PVector center;
PGraphics canvas;
void setup() {
size(displayWidth, displayHeight);
canvas = createGraphics(displayWidth * 2, displayHeight * 2);
canvas.beginDraw();
canvas.background(255);
View gist:14370c41f1035257f606
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
randomSeed = ofRandom(100000);
for(int i = 0; i < COLOR_SOURCES; i++) {
ofImage img;
img.loadImage("color-source/color-source-" + ofToString(i) + ".jpg");
img.resize(CANVAS_WIDTH, CANVAS_HEIGHT);
View Valid Email Address
public boolean isValidEmailAddress(String email) {
String ePattern = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$";
java.util.regex.Pattern p = java.util.regex.Pattern.compile(ePattern);
java.util.regex.Matcher m = p.matcher(email);
return m.matches();
}
@riebschlager
riebschlager / gist:f52e434fa8508bfceedb
Last active Aug 29, 2015
Three Little Pigs (Javascript Edition)
View gist:f52e434fa8508bfceedb
var pigs = [{
name: 'Doug',
}, {
name: 'Larry'
}, {
name: 'Virgil'
}];
var houses = {
straw: {
You can’t perform that action at this time.