Skip to content

Instantly share code, notes, and snippets.

View LeWestopher's full-sized avatar

Wes King LeWestopher

View GitHub Profile
@LeWestopher
LeWestopher / index.js
Created May 15, 2018 00:12
Beginner example for ZJ
const number = 1 // Number
const float = 1.1 // Number && Float ???? :(((((
const array = [1, 2, 3]
const string = 'Hello world.'
// object literal
const zj = {
name: 'ZJ Keenan',
age: 19,

Objective: Build a user profile page using Vue or Angular

Requirements:

  1. Should list their first and last name.
  2. Should list their email address.
  3. Should list their phone number.
  4. Should display a profile pic image of them hosted at Gravatar.com
  5. Should contain a button that says "Contact Me" that will console.log the user's email address when clicked
@LeWestopher
LeWestopher / promises.js
Last active September 20, 2017 20:07
Promise Overview
const Bluebird = require('bluebird');
const fs = require('fs');
// Run multiple promises at once and get their values
Bluebird
.join(
runPromise1(),
runPromise2(),
runPromise3()
)
0x8Beb68D1ca2bb4a68135d69cCa9877098dA5f1be
@LeWestopher
LeWestopher / index.js
Created August 16, 2017 03:04
Beginnings of a FP oriented framework for developing microservices on RabbitMQ
const Rx = require('rx-node');
const Amqp = require('amqplib');
/**
* Returns a curried function with url and options applied that returns a
* connection object.
*
* @param {string} url
* @param {object} options
*/
@LeWestopher
LeWestopher / README.md
Created July 21, 2017 03:11
Boone Coding Challenge

Introduction

In web development, the rendering of HTML for consumption by the browser is one of the first skills that is acquired by savvy software engineers. You may not realize it, but the vast majority of pages that you see on the web areto rendered programmatically, meaning the HTML is determined by a list of dynamic objects stored in a database somewhere. To this end, it is important to know how to do basic string replacement in order to produce the bits of HTML needed to be rendered onto our webpages.

In this assignment, you will be taking a simple "Person" object defined below and using it to render out a basic user profile for that object. This does not have to be flashy and does not even have to render into a webpage. A simple "print" to your terminal or console from your programming language of choice of the final HTML will suffice. You can use whatever language that you are familiar with to write this code. The implementation is entirely up to you. You may choose to write just a single f

@LeWestopher
LeWestopher / app.js
Created May 24, 2017 21:54
FP example of ESRI map
(function () {
window.App = function ([
Map,
esriConfig,
ServiceAreaTask,
ServiceAreaParameters,
FeatureSet,
SimpleMarkerSymbol,
SimpleLineSymbol,
SimpleFillSymbol,
@LeWestopher
LeWestopher / js_exercise.md
Last active May 9, 2017 21:27
Array prototype exercises
@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 = {};
@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"