Skip to content

Instantly share code, notes, and snippets.

View MattMcFarland's full-sized avatar

Matt McFarland MattMcFarland

  • Software Engineer
  • Dayton, OH
View GitHub Profile
@MattMcFarland
MattMcFarland / .gitignore
Created September 15, 2015 16:13
My .gitignore file (mac os, windows, nodejs, cloud9-ide, jetbrains ide)
# Created by .ignore support plugin (hsz.mobi)
### Linux template
*~
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
### JetBrains template

TODOS:

[x] lol

[ ] k

@MattMcFarland
MattMcFarland / test.js
Created November 14, 2015 10:27
BDD - Use with Mocha, Chai, and Selenium
// Start with a webdriver instance:
var
baseUrl = 'localhost:8080',
chai = require('chai'),
assert = chai.assert,
expect = chai.expect,
should = chai.should(),
chaiWebdriver = require('chai-webdriver'),
request = require('supertest')(baseUrl),
sw = require('selenium-webdriver'),
@MattMcFarland
MattMcFarland / watch.js
Created May 26, 2016 15:24
node js watch, run mocha on __tests__, run eslint on files, syntax checking
import sane from 'sane';
import { resolve as resolvePath } from 'path';
import { spawn, fork } from 'child_process';
import { existsSync as fileExists} from 'fs';
import {
red, green, yellow, blue,
magenta, cyan, white, gray
} from 'chalk';
process.env.PATH += ':./node_modules/.bin';
@MattMcFarland
MattMcFarland / styles.less
Created July 15, 2016 17:00
Ligature fonts for atom
atom-text-editor {
font-family: 'Fira Code';
font-style: normal;
text-rendering: optimizeLegibility;
}
atom-text-editor::shadow {
.string.quoted,
.string.regexp {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
@MattMcFarland
MattMcFarland / index.js
Created July 18, 2016 17:33
requirebin sketch
const choo = require('choo');
const html = require('choo/html');
const marked = require('marked');
const app = choo();
app.model({
namespace: 'choodown',
state: {
text: ''
},
@MattMcFarland
MattMcFarland / index.js
Created July 21, 2016 12:30
requirebin sketch
const choo = require('choo');
const html = require('choo/html');
const marked = require('marked');
const app = choo();
app.model({
namespace: 'choodown',
state: {
text: ''
},
@MattMcFarland
MattMcFarland / index.js
Created July 21, 2016 12:30
requirebin sketch
const choo = require('choo');
const html = require('choo/html');
const marked = require('marked');
const app = choo();
app.model({
namespace: 'choodown',
state: {
text: ''
},
@MattMcFarland
MattMcFarland / index.js
Last active October 14, 2016 17:29 — forked from willkessler/index.js
requirebin sketch
const choo = require('choo')
const html = require('choo/html')
const app = choo()
app.model({
state: { title: 'Set the title' },
reducers: {
update: (action, state) => ({ title: action.value })
}
})