Skip to content

Instantly share code, notes, and snippets.

View ErikPeterson's full-sized avatar

Ricky Tomatoes ErikPeterson

View GitHub Profile
@ErikPeterson
ErikPeterson / resume.md
Last active October 30, 2015 19:47
Resume

#Resume

##Bio Born and raised in Weston, MA. Attended Rhode Island School of Design (BFA 2011). Graduated Flatiron School in 2014.

##Employment

Bon Appétit Magazine - Developer (2011-2014) Created original, interactive front-end features for bonappetit.com. Architected and lead transition from Teamsite CMS to Wordpress. Consulted on web strategy, SEO, and technology decisions.

PATH
remote: .
specs:
stripe-ruby-mock (2.2.0)
dante (>= 0.2.0)
jimson-temp
stripe (>= 1.27.0)
GEM
remote: https://rubygems.org/
var Calculator = function(){};
Calculator.prototype.input = function(operand1, operator, operand2){
if(operator === '+'){
return this.add(operand1, operand2);
}
}
Calculator.prototype.add = function(operand1, operand2){
return operand1 + operand2;
GIT
remote: git://github.com/rails/rails.git
revision: d45c3ab658bb02544eb02abe49600be9763eeeda
branch: 4-2-stable
specs:
actionmailer (4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
mail (~> 2.5, >= 2.5.4)
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', github: 'rails/rails', branch: '4-2-stable'
# Use Postgres as the database for Active Record
gem 'pg'
# Use Fog to manage uploads to S3
gem 'fog'
@ErikPeterson
ErikPeterson / ballObj.js
Created January 24, 2015 21:13
ballObj.js
var Ball = function(scale, startx, starty, startz, maxy, miny, direction, material, scene){
this.geometry = new Three.SphereGeometry(100, 32, 32);
this.mesh = new THREE.mesh(this.gemoetry, material)
this.mesh.position.x = startx;
this.mesh.position.y = starty;
this.mesh.position.z = startz;
this.mesh.scale.x = this.mesh.scale.y = this.mesh.scale.z = scale;
@ErikPeterson
ErikPeterson / threevideodemo.js
Last active October 5, 2022 06:53
THREEJS Video Texture Demo
//Set up scene, camera, and renderer
var scene = new THREE.Scene;
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 );
var renderer = new THREE.CanvasRenderer();
renderer.setClearColor( 0xf0f0f0 );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
var video = document.createElement('video');

Keybase proof

I hereby claim:

  • I am erikpeterson on github.
  • I am erikpeterson (https://keybase.io/erikpeterson) on keybase.
  • I have a public key whose fingerprint is 3F44 7C80 DBC7 9FAF 8D97 2CDC DAFF 1F4D EA34 C8ED

To claim this, I am signing this object:

@ErikPeterson
ErikPeterson / gist:cfdbec9ebdbcea1f0f5c
Last active August 29, 2015 14:07
Simple ajax form submit
//right inside of your window.onload function
var formButton = document.querySelector('the_id_of_your_forms_button_here');
formButton.addEventListener('click', function(e){
//stop form from submitting through the browser the default way
e.preventDefault();
var name = document.querySelector('id_of_the_name_field').value;
var address = document.querySelector('id_of_the_address_field').value;
//The body of the html
<body>
<ul id="my-items">
</ul>
<form id="myform">
<input name="myvalue" type="text"></input>
<input type="submit" id="thebutton"></input>
</form>
....