Skip to content

Instantly share code, notes, and snippets.

@redonkulus
redonkulus / shallow_lifecycle_test.js
Last active March 14, 2018 19:57
Simple Enzyme shallow componentDidUpdate test
import React, { Component } from 'react';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({
adapter: new Adapter(),
disableLifecycleMethods: false
});
var didItGetCalled = false;

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@redonkulus
redonkulus / gist:a29fe3c85c3e5b4c2c78eb4c1ef61ef4
Last active February 15, 2018 17:51
Simple publish setup
heroku login
git remote add heroku https://git.heroku.com/fluxibleio-staging.git
git subtree push --prefix site heroku master
Routes.json
[{
"settings": [ "master" ],
"single": {
"verbs" : [ "get" ],
"path" : "/",
"call" : "single.index"
},
"composite": {
"verbs" : [ "get" ],
@redonkulus
redonkulus / gist:3176259
Created July 25, 2012 13:42
TOC example
/**
* Used with Styledocco
* Dynamically create table of contents from H1's on page
*/
(function () {
'use strict';
var x, header, article, link,