Skip to content

Instantly share code, notes, and snippets.

View LeWestopher's full-sized avatar

Wes King LeWestopher

View GitHub Profile
@LeWestopher
LeWestopher / README.md
Created December 1, 2016 22:22
Invoice Test Server

To Run

  1. Navigate into server file, npm install and node index to get server running.
  2. Navigate back to Invoice tool. Gulp to build the app.
  3. Run the following to test the API extension:
node build/api --endpoint=http://localhost:50000/invoice-process -- test/realData.csv
@LeWestopher
LeWestopher / README.md
Created December 13, 2016 18:40
Introduction to REST Resources

Introduction

We follow a particular standard for developing the RESTful resources in BandManager's API for data. These requirements are as follows:

Resource Requirements

  • All Controller names follow singular format: EnsembleFeeController, not EnsembleFeesController.
  • All routes are created using the Route::resource() method in the routes file.
  • Custom route actions are generated using regular route methods, but are designated before the ::resource() definition.
  • All controllers have actions are are properly authorized using a Policy class.
@LeWestopher
LeWestopher / README.md
Last active December 13, 2016 21:11
Changes and Feature Requests for Boone.io

Suggested Wording Changes

  • Front Page - Text section with "Learn More" button - change "great advances" to "ever-evolving advances"
  • Front Page - Band Manager product block - "premeire" is wrong form, should be "premeir", two different words
  • About Page - My "about me" block - Change "building beautiful solutions" to "building elegant solutions"
  • About Page - We should have a consistenty format for City, State. Once place uses "Mobile, Ala", and other places use "Petal, Mississippi"
  • About Page - Sheldon's "about me" block - add "and" before "Mobile County Sheriff's Office"
  • About Page - "We're Boone Software" block - remove "just" from the first sentence to add formality

Spelling Changes

@LeWestopher
LeWestopher / README.md
Created December 19, 2016 19:42
Install PHP 5.6

apt-get -y update

add-apt-repository ppa:ondrej/php

apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip

apt-get -y update

@LeWestopher
LeWestopher / db_schema.json
Created December 21, 2016 19:28
Schema for Workout Application
{
"users": {
"id": "number, int(11), NOT null, unique, autoincrement",
"email": "string, varchar(255), NOT null, unique",
"first_name": "string, varchar(255), null",
"last_name": "string, varchar(255), null",
"password": "string, varchar(255), NOT null, unique",
"created": "date, datetime, NOT null",
"updated": "date, datetime, NOT null"
},
@LeWestopher
LeWestopher / README.md
Created January 10, 2017 23:19
Setting up Knex

Checkout http://knexjs.org for tutorials an instructions

  1. In project root, install knex module using npm install knex --save
  2. Create a new file at src/database/index.js.
  3. In that file, follow the instructions under "Initializing the Library" to create the knex variable with your appropriate connection options passed in.
  4. Export the knex variable so we can use it in other parts of the application.
@LeWestopher
LeWestopher / appointmentMigrate.js
Created January 23, 2017 23:02
Migration file
'use strict';
var dbm;
var type;
var seed;
/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
@LeWestopher
LeWestopher / README.md
Created January 26, 2017 19:49
Let's get n8 a jerb

LET'S DO THIS

"Always, no sometimes, think it's me But you know I know when it's a dream I think I know I mean a "Yes" but it's all wrong That is I think I disagree"

  • The Beatles

The Client

@LeWestopher
LeWestopher / zipServer.sh
Created April 2, 2017 21:13
Shell command to zip up Laravel project for Elastic Beanstalk
#!/bin/bash
zip ./staging-release-1.zip -r * .[^.]* --exclude=*vendor* -x ".git" -x ".vagrant"
@LeWestopher
LeWestopher / sequelize-compose.js
Last active April 7, 2017 00:07
A short, sweet library of function for composable, reusable Sequelize queries
/**
* compose() is the magic behind this library. It takes a variadic list of function references as its arguments and returns
* a new function that consists of all the function references chained together, top to bottom, with the return of one as
* the first argument of the next until all functions are called and a result is returned. This is useful for transforming
* the shape of objects as they move through the pipeline
*/
const compose = (...fns) => fns.reverse().reduce((f, g) => (...args) => f(g(...args)))
// Arbitrary source of other sequelize models for `include()`
const models = {};