Skip to content

Instantly share code, notes, and snippets.

View douglas-mason's full-sized avatar

Douglas Mason douglas-mason

View GitHub Profile
@douglas-mason
douglas-mason / modified.md
Last active October 10, 2019 20:48
Horizontal slicing style guide

Horizontal slicing style guide

File naming

FeatureNameAndFileType.extension

Examples:

DashboardComponent.jsx

Keybase proof

I hereby claim:

  • I am douglas-mason on github.
  • I am douglasmason (https://keybase.io/douglasmason) on keybase.
  • I have a public key ASAOyFO9R2vrWVpMJCRCs_uK4zi9bX8plPCgpj1L7X9MXQo

To claim this, I am signing this object:

// pseudo code for creating a new tracker and saving to the user that created it
(req, res) => {
const userId = req.body.userId;
const trackerData = {
name: req.body.name,
description: req.body.name,
// more stuff
}
let trackerId;
@douglas-mason
douglas-mason / email.regex.txt
Created October 31, 2017 20:26
email regex
\w+[.|\w+]+@\w+[.|\w+]+\S
@douglas-mason
douglas-mason / app.js
Created September 15, 2017 15:02
callback example
const app = {
get: (route, cb) => {
console.log('sending user to this route:' + route);
const req = {
user: 'Doug'
};
const res = {
author: 'Annie',
sendData: (data) => {
console.log('sending this data -> ' + JSON.stringify(data))
class UserCard {
constructor(userName, departmentName) {
this.userName = userName;
this.departmentName = departmentName;
this.setHandlers();
}
setHandlers() {
$('.profile-container').hover(() => {
// do the flippy thang
@douglas-mason
douglas-mason / readme.md
Created March 3, 2017 04:50
20170302-CL-Weekly-Gist Top Picks of the Week