Skip to content

Instantly share code, notes, and snippets.

View JustinBeaudry's full-sized avatar

Justin Beaudry JustinBeaudry

View GitHub Profile

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@JustinBeaudry
JustinBeaudry / 01_Queueing_Theory.md
Created December 29, 2017 00:01 — forked from rondy/01_Queueing_Theory.md
Queueing Theory references

Queueing Theory references

General content

http://www.shmula.com/queueing-theory/
http://ferd.ca/queues-don-t-fix-overload.html
https://news.ycombinator.com/item?id=8632043
https://thetechsolo.wordpress.com/2015/01/25/queueing-theory-explained/
http://people.revoledu.com/kardi/tutorial/Queuing/index.html
http://setosa.io/blog/2014/09/02/gridlock/index.html
@JustinBeaudry
JustinBeaudry / AngularJS Snippets.md
Created June 3, 2016 00:23 — forked from kentcdodds/AngularJS Snippets.md
AngularJS Chrome DevTools Snippets

Angular Snippets

Some snippets for Chrome that I've made or found/modified and thought were useful.

demo

@JustinBeaudry
JustinBeaudry / bson-objectid-regex.js
Created April 20, 2016 21:30 — forked from coquin/bson-objectid-regex.js
A regular expression to match BSON ObjectID
var objectIdRegEx = /^([^\/]+)\/(.*?)\/([^\/]+)\/([0-9a-f]{24})$/;
@JustinBeaudry
JustinBeaudry / promise-retryer.js
Created March 25, 2016 22:24 — forked from domenic/promise-retryer.js
Generalized promise retryer
"use strict";
// `f` is assumed to sporadically fail with `TemporaryNetworkError` instances.
// If one of those happens, we want to retry until it doesn't.
// If `f` fails with something else, then we should re-throw: we don't know how to handle that, and it's a
// sign something went wrong. Since `f` is a good promise-returning function, it only ever fulfills or rejects;
// it has no synchronous behavior (e.g. throwing).
function dontGiveUp(f) {
return f().then(
undefined, // pass through success
// kills long running ops in MongoDB (taking seconds as an arg to define "long")
// attempts to be a bit safer than killing all by excluding replication related operations
// and only targeting queries as opposed to commands etc.
killLongRunningOps = function(maxSecsRunning) {
currOp = db.currentOp();
for (oper in currOp.inprog) {
op = currOp.inprog[oper-0];
if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) {
print("Killing opId: " + op.opid
  1. General Background and Overview
angular.module('keyboard', [])
.factory('keyboardNavigation', function () {
var keyboardContextStack = [];
var navigatables = {};
var activeIndex = 0;
return {
active: null,
register: function (scope, events, element) {

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@JustinBeaudry
JustinBeaudry / index.html
Last active August 29, 2015 14:14 — forked from jfsiii/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Holy Grail</title>
<style>
/* some basic styles. nothing to do with flexbox */
header, footer,
nav, article, aside {
border: 1px solid black;