Skip to content

Instantly share code, notes, and snippets.

View josephtaylor's full-sized avatar

J. Taylor O'Connor josephtaylor

View GitHub Profile
@josephtaylor
josephtaylor / pentagonal_ish.java
Created December 8, 2012 22:14
A Mess up while trying to do some pentagonal stuff
PVector center;
PVector point;
float x, y, r, theta;
ArrayList<PVector> newPoints;
void setup() {
size(700,700);
background(255);
r = 100;
theta = 0;
import java.util.ListIterator;
GridSpace[][] grid;
final int SIZE = 200;
ArrayList<GridSpace> points;
void setup() {
size(1000, 1000);
background(255);
stroke(0,0,0);
@josephtaylor
josephtaylor / NestedCircles2.java
Created February 11, 2013 16:10
This is the code that produced this Tumblr post: http://jtoprocessing.tumblr.com/post/42811336056/
PVector center;
float x1, y1, theta, r1, r2, x2, y2;
float bigTheta;
void setup() {
size(500, 500);
background(255);
smooth();
stroke(0,0,0,255);
fill(0);

After installing Arch on my Raspberry Pi, internet worked out of the box: I could plug it into the router, turn it on, ssh in and start downloading things. But the router is in my housemate's bedroom, which isn't ideal. If I want the Pi to be connected to the internet in my room, I need it to be connected to my laptop. (Another option would be a USB wifi dongle, of course.) This is how I did it. Much credit goes to the Ubuntu wiki's Connection sharing page.

I should disclaim that I don't fully understand networking stuff, and some of what I say might be wrong. I also didn't write this as I was going; so while I've consulted my browser and shell histories, it's possible I've forgotten some steps.

My laptop is running Gentoo, and this is where most of the work has to be done. It connects to the internet through wifi, on interface wlan0. The ethernet port is eth0, and eth0 is also the name of the ethernet port on the Pi.

Step zero: plug ev

@josephtaylor
josephtaylor / gist:72d28db07ce624d74a7a
Last active August 29, 2015 14:02
Processing sketch
private ArrayList<Point> points;
private final int NUM_POINTS = 20000;
private final float NOISE_INCREMENT = 0.03;
void setup() {
size(700,700);
background(255);
stroke(0,0,0,10);
points = new ArrayList<Point>();
@josephtaylor
josephtaylor / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@josephtaylor
josephtaylor / BucketServiceImpl.java
Created January 15, 2016 02:28
service to put a file in an S3 bucket and make it public with spring-cloud-aws
package something;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.CannedAccessControlList;
import com.amazonaws.services.s3.transfer.TransferManager;
import com.amazonaws.services.s3.transfer.Upload;
import com.amazonaws.services.s3.transfer.model.UploadResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@josephtaylor
josephtaylor / bump.sh
Created October 13, 2017 16:47 — forked from marcuswhybrow/bump.sh
Script to bump the major, minor or patch number by adding a new tag to the git repository, and modifying the "latest" tag.
#!/usr/bin/env bash
latest_tag=$(git tag -l *.*.* --contains $(git rev-list --tags --max-count=1))
if [[ ! "$latest_tag" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "The \"latest\" tag did not exist, or did not point to a commit which also had a semantic version tag."
exit 1
fi
major=$(echo "$latest_tag" | awk -F '.' '{print $1}')
@josephtaylor
josephtaylor / blurry_lines.pde
Created June 20, 2018 13:31
blurry-lines processing sketch
import java.time.LocalDateTime;
void setup() {
size(500,500);
background(255);
colorMode(RGB);
}
void draw() {
stroke(0,0,0,128);
@josephtaylor
josephtaylor / NoiseExperiment.pde
Created July 1, 2018 15:38
Processing Noise Experiment
import java.time.LocalDateTime;
private ArrayList<Point> points;
private final int NUM_POINTS = 20000;
private final float NOISE_INCREMENT = 0.01;
void setup() {
size(700,700);