Skip to content

Instantly share code, notes, and snippets.

View matthewepler's full-sized avatar

Matthew Epler matthewepler

View GitHub Profile
class Layer {
constructor () {
// console.log('new Layer with', arg)
this.sides = SIDES
this.layerColor = null
this.numShapes = this.sides
this.angle = TWO_PI / this.numShapes
this.stepsOut = 8
this.singleStep = (CRYSTAL_SIZE / 2) / this.stepsOut
this.thinStroke = 1
@matthewepler
matthewepler / README.md
Last active May 17, 2020 05:12
create-react-app linting setup with 'standard' style

Setup Your Machine

NOTE: You only need to do these steps once on your machine

  • Install ESlint globally on your machine: npm install -g eslint

  • Make sure you have nvm installed. This is a way to handle multiple versions of Node on your machine. If you're not sure you have it, try running nvm in Terminal. If you get a help file, you have nvm! If not, run this command to install it:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

  • Install ESLint in your editor of choice.
  • Note: if you already have SublimeLinter installed, you may need to disable the contributed linter package you normally use in order for the rest of this to work.
@matthewepler
matthewepler / config-questions.md
Last active February 27, 2017 07:11
Questions for Adam regarding setup for simple app

1. Should I use a framework instead of what I'm doing now

In the video, you addressed the issue of testing a file which includes both DOM manipulation and logic code. This makes sense. Immediately, I wondered if I should be using some lightweight framework that enforces file separation. Do you think I should?

I was intruiged by Neutrino, which to me is less of a framework and more of a config preset. What do you recommend? The goal here is to learn best practices and make sure I have a solid foundation to build from. At work, we are using Node and React, but no one is building projects with both backend and front-end elements. That will be my job, eventually and that's whay I'm trying to get experience with backend. I know enough React to be dangerous already.

2. What to test, and where.

Should HTML be tested totally separate from JS logic? Are there situations when I would need to test them together? Do you have any recommended repos for me to look at t

const nodemailer = require('nodemailer');
function sendMail() {
const transporter = nodemailer.createTransport({
service: 'Gmail',
auth: {
user: 'ggdb.info@gmail.com',
pass: '<password>'
}
});
import gab.opencvpro.*;
import org.opencv.imgproc.Imgproc;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.CvType;
import org.opencv.core.MatOfPoint;
import org.opencv.core.Point;
import java.awt.Rectangle;
@matthewepler
matthewepler / test.pde
Created November 19, 2012 23:50
matthew_epler
/**
* Sine.
*
* Smoothly scaling size with the sin() function.
*/
float spin = 0.0;
float diameter = 84.0;
float angle;
@matthewepler
matthewepler / RandomSquares
Created November 17, 2012 02:35
Rosetta test
/*
methods:
1. vernacular
preserve the spirit of the image
least work
but the influence of the original tool is lost
2. rosetta
preserve the spirit of the code itself
connects old languages to new languages
3. revival