Skip to content

Instantly share code, notes, and snippets.

Robert Mills robcmills

Block or report user

Report or block robcmills

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robcmills
robcmills / openspace-tooltip-challenge.md
Last active Mar 27, 2020
OpenSpace Frontend React Tooltip Coding Challenge
View openspace-tooltip-challenge.md

OpenSpace Frontend Interview React Tooltip Challenge

In order to assess candidates technical comptetence, especially in React, we ask them to build a Tooltip component.

Challenge 1

Implement the simplest possible version of a Tooltip. Render an "anchor" div in the center of the screen and on hover show a "tooltip" div to the right of it.

challenge 1

View engineering-principles.md

Engineering Principles

Know Why

  • This person works without any interest in why the work is necessary or how it affects the user and system. If changes are requested they don’t have an informed opinion of whether it’s desirable. They’re not sure of how different entities on the network piece together.
  • This person understands the central motivation behind a task, but isn’t aware of enough context to propose changes. They’re aware of the high level goal that this work ties into, but isn’t confident in how this feature advances those goals.
  • This person is confident in the motivation behind a task and how it ties into higher level goals. They ask questions to tease out hidden assumptions and clarify parts of task that are hidden or not examined.
  • This person is able to explain the motivation behind a task and how it ties into a high level goal. They see one step ahead and ask about how it could affect other parts of the product and offer potential solutions when problems exist. They work closely wit
View pm2-intro.md

PM2

Overview

In production Heroku uses Procfile. pm2 roughly emulates this.

Trace npm start -> node pm2/start.js

Basically pm2/start.js is just a node script that uses pm2's node api to start processes according to the dynamically imported config.

@robcmills
robcmills / atomic-emails-demo.md
Last active Nov 13, 2017
Atomic Emails - BC 2017
View atomic-emails-demo.md
@robcmills
robcmills / smart-component-style.js
Created Aug 26, 2016
smart component style - class vs functional with flow and lifecycle
View smart-component-style.js
// https://github.com/BuildingConnected/client/pull/1648
// apps/main/new-prequals/dashboard/vendor/modal/notes.js
const Notes = ({
...props,
}) => (
<div className={classes.root}>
{/*...*/}
</div>
)
@robcmills
robcmills / catan-conquest.md
Last active Mar 17, 2016
Conquest of Catan. Build, attack, conquer.
View catan-conquest.md

Catan Conquest

The objective of Catan Conquest is to grow your army, claim the most land, defeat your enemies, and conquer the island of Catan.

Overview of changes:

  • resource production refactor (see Resources section below)
  • settlements, cities, & armies are placed in the center of hexes instead of at the intersections
@robcmills
robcmills / catan-castles-and-armies.md
Last active Mar 15, 2016
Catan Castles & Armies
View catan-castles-and-armies.md

Catan Castles & Armies

Unless noted here, Catan Castles & Armies follows all the rules of regular Catan

Overview of changes:

  • buildings (settlements, cities, armies) are placed in the center of hexes instead of at the intersections
  • no distance rule (except for initial placement)
View colorful-git
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@robcmills
robcmills / trim-html.js
Last active Dec 16, 2015
Simple function to trim html content to a specified length.
View trim-html.js
// var htmlIn = '<div>Hello world!</div>';
// var htmlIn = '<div>Hello <b><i>world!</i></b></div>';
// var htmlIn = '<div><ol><li>Hello</li><li><b>world!</b></li></ol></div>';
// var htmlIn = '<div>1</div><div>2</div><div><br/></div><ol><li><b><i>Hello<i><b></li><li><b>world!</b></li></ol></div>';
var htmlIn = '<div>Hello </div><div><br/></div><div>world!</div>';
var trimTo = 8; // trim to this length
var trimHtml = function(html, trim) {
@robcmills
robcmills / camera-submit-codepath.js
Created Sep 9, 2015
selected code from codepath following bonus cam media submission to retry upload
View camera-submit-codepath.js
// file input element gets media
// submission_media.hbs line:36
<form enctype="multipart/form-data" class='media-upload-form'>
// submission_media.js line:134
fileDidChange: function() {
//...
this.setFile(file);
You can’t perform that action at this time.