Skip to content

Instantly share code, notes, and snippets.

View maxmckenzie's full-sized avatar

Max McKenzie maxmckenzie

View GitHub Profile
@maxmckenzie
maxmckenzie / vue-server.js
Created July 13, 2019 09:33
vue express server with history fallback
var express = require('express')
var path = require('path')
const history = require('connect-history-api-fallback')
const app = express()
app.use(express.static(path.join(__dirname, 'static')))
app.use(express.static(path.join(__dirname, 'dist')))
app.use(history({
@maxmckenzie
maxmckenzie / sublime-todo-json
Created July 13, 2019 09:32
sublime todo plugin settings
{
"patterns": {
"TODO": "TODO[\\s]*?[\\s]*(?P<todo>.*)$"
},
"patterns_weight": {
},
"exclude_folders": [
"*.git*",
"node_modules/**"
],
@maxmckenzie
maxmckenzie / .zshrc
Created July 13, 2019 09:32
many aliases/alias's...
alias dev="cd ~/Development"
eval "$(direnv hook zsh)"
# repo shortcuts
alias seam="cd ~/Development/seam"
# Editor
export EDITOR='vim'
# ExpressVPN
@maxmckenzie
maxmckenzie / project-outline.md
Created July 13, 2019 09:31
project outline guideline

Project Specification Outline

AKA the most important part of the whole thing, whatever that thing maybe!

tree-swing-project-management-large.png

Description:

give a detailed description of what the project is, why the client/user needs it, and what solution this aims to provide.

Client:

@maxmckenzie
maxmckenzie / gitlab-ci-yml
Created July 13, 2019 09:30
gitlab-ci-yml example config with sonar cube.
image: node:latest
stages:
- build
- test
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
@maxmckenzie
maxmckenzie / nightwatch-config.js
Created July 13, 2019 09:19
nightwatch config for cucumber and gherkin
// http://mucsi96.github.io/nightwatch-cucumber/
const seleniumServer = require('selenium-server')
const phantomjs = require('phantomjs-prebuilt')
const chromedriver = require('chromedriver')
require('nightwatch-cucumber')({
cucumberArgs: [
'--compiler', 'js:babel-core/register',
'--require', 'features/step_definitions',
'--require', 'features/hooks.js',
@maxmckenzie
maxmckenzie / example.html
Last active October 3, 2018 11:47
Legacy sass grid system without flexbox, but also not using floats. Created for a project with IE9 support.
<div>
<div className="grid-row">
<div className="col _6 col-demo">col _6</div>
<div className="col _6 col-demo">col _6</div>
</div>
<div className="grid-row">
<div className="col _6">
<div className="grid-row">
<div className="col _6 col-demo">nested col _6</div>
<div className="col _6 col-demo">nested col _6</div>
@maxmckenzie
maxmckenzie / grid.less
Created August 14, 2018 17:10
Flexbox Grid
/*
Grid and breakpoints
*/
@gutter-width: 0.5rem;
@outer-margin: 2rem;
@gutter-compensation: calc((@gutter-width * 0.5) * -1);
@half-gutter-width: calc((@gutter-width * 0.5));
@xs-bp:30rem;
// Spread operirators baby
var Array = [[1, 2],[3, 4, 5], [6, 7, 8, 9]];
var result = [].concat(...Array);
console.log(result);
@maxmckenzie
maxmckenzie / App.vue
Last active February 1, 2017 19:57
Vue webpack Vue-router configuration (Standard JS Style)
// src/App.vue
<template>
<div>
<div class="menu">
<router-link :to=" { name: 'home' }">Home</router-link>
<router-link :to=" { name: 'auth' }">Auth</router-link>
</div>
<div id="app">
<router-view></router-view>
</div>