Skip to content

Instantly share code, notes, and snippets.

View slightlytyler's full-sized avatar
💭
🤓 codin'

Tyler Martinez slightlytyler

💭
🤓 codin'
  • Cat City
View GitHub Profile
@slightlytyler
slightlytyler / wow-console-commands.txt
Last active August 15, 2019 23:49
WoW console commands to remember
/console farclip 4000
/console weatherdensity 3
/console violencelevel 5
# This one is more preference
/console ffxglow 0
@slightlytyler
slightlytyler / Branch.js
Last active September 23, 2019 17:29
The power of a branch
// Basic branch
const Branch = props => {
if (props.condition) return props.renderLeft();
return props.renderRight();
};
Branch.defaultProps = {
renderRight: () => null,
};
Common Features Scenes
Low level Mid level High level
No domain Single domain Cross domain
Technical division Logical division No division
General Specialized Unique

Example structure

@slightlytyler
slightlytyler / state.js
Last active January 29, 2019 21:59
Example paginated redux state
{
users: {
objects: {
alpha: {
loading: false,
error: null,
data: { id: 'alpha', ... },
},
beta: { ... },
gamma: { ... }
@slightlytyler
slightlytyler / Makefile
Last active November 24, 2018 01:30
Makefile for slightlytyler/docker-ui-demo
# Default env vars
API_URL?=
ARGS?=
PORT?=3000
GIT_SHA=$(shell git rev-parse HEAD)
TAG=slightlytyler/docker-ui-demo
TAG_DEV=slightlytyler/docker-ui-demo-dev
VOLUME_MOUNTS=-v $(PWD)/src:/usr/app/src \
-v $(PWD)/package.json:/usr/app/package.json \
@slightlytyler
slightlytyler / Makefile
Last active November 24, 2018 01:31
Makefile for slightlytyler/docker-ui-demo
# Default env vars
API_URL?=
ARGS?=
PORT?=3000
GIT_SHA=$(shell git rev-parse HEAD)
TAG=slightlytyler/docker-ui-demo
TAG_DEV=slightlytyler/docker-ui-demo-dev
VOLUME_MOUNTS=-v $(PWD)/src:/usr/app/src \
-v $(PWD)/package.json:/usr/app/package.json \
@slightlytyler
slightlytyler / Makefile
Last active November 24, 2018 01:24
Makefile for slightlytyler/docker-ui-demo
# Default env vars
API_URL?=
ARGS?=
PORT?=3000
GIT_SHA=$(shell git rev-parse HEAD)
TAG=slightlytyler/docker-ui-demo
TAG_DEV=slightlytyler/docker-ui-demo-dev
VOLUME_MOUNTS=-v $(PWD)/src:/usr/app/src
@slightlytyler
slightlytyler / Makefile
Last active November 24, 2018 01:25
Makefile for slightlytyler/docker-ui-demo
# Default env vars
API_URL?=
PORT?=3000
GIT_SHA=$(shell git rev-parse HEAD)
TAG=slightlytyler/docker-ui-demo
TAG_DEV=slightlytyler/docker-ui-demo-dev
VOLUME_MOUNTS=-v $(PWD)/src:/usr/app/src
all: build
@slightlytyler
slightlytyler / dev.Dockerfile
Last active August 29, 2019 20:01
Dockerfile.dev for slightlytyler/docker-nginx-demo
FROM node:11.1.0-alpine AS node_base
FROM node_base as deps
WORKDIR /usr/app
COPY package.json /usr/app/package.json
COPY yarn.lock /usr/app/yarn.lock
RUN yarn install
FROM node_base as dev
WORKDIR /usr/app
@slightlytyler
slightlytyler / Dockerfile
Created November 21, 2018 22:13
Dockerfile for slightlytyler/docker-nginx-demo
FROM socialengine/nginx-spa
COPY --from=slightlytyler/docker-ui-demo /usr/app /app