Skip to content

Instantly share code, notes, and snippets.

Morgan Intrator morgs32

Block or report user

Report or block morgs32

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
martyndavies / rollup.sql
Created Apr 6, 2018
Example of a Postgres rollup
View rollup.sql
CREATE OR REPLACE FUNCTION compute_5min_rollups(start_time TIMESTAMP, end_time TIMESTAMP)
INSERT INTO rollups_5min
date_trunc('seconds', (timestamp - TIMESTAMP 'epoch') / 300) * 300 + TIMESTAMP 'epoch' AS minute,
count(*) AS query_count,
View data.js
// routes.js
const routes = [
path: '/',
component: Home,
exact: true
path: '/gists',
component: Gists
yossorion /
Last active Sep 19, 2019
What I Wish I'd Known About Equity Before Joining A Unicorn

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

tophtucker / .block
Last active Mar 12, 2017 — forked from mbostock/.block
Zoomable Icicle (d3 v4)
View .block
license: gpl-3.0
tamlyn /
Last active Jul 26, 2019
Execution order of Jest/Jasmine test code

Execution order of Jest/Jasmine test code

While tests run in source order, surrounding code does not which can lead to hard to debug issues.

Compare the test file below with the sample output below that and note the order of the log messages.

Key points

  • Any code not inside of it, beforeAll, afterAll, beforeEach or afterEach runs immediately on initialisation.
    • This means code at the end of your file runs before even your before hooks.
matthieuprat /
Last active May 23, 2019
Until operator for Enzyme's shallow wrapper


import until from 'path/to/until'
import { shallow } from 'enzyme'

const EnhancedFoo = compose(
View react-router-v4-page-transitions.jsx
import React from 'react'
import { TransitionMotion, spring } from 'react-motion'
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Link from 'react-router/Link'
import Redirect from 'react-router/Redirect'
const styles = {}
styles.fill = {
dh94 / mdStyleColor.js
Last active Apr 12, 2017 — forked from ThadeuLuz/mdStyleColor.js
Trying to add more flexibility to elements css in angular-material
View mdStyleColor.js
(function () {
"use strict";
var _theme;
var _palettes;
.config(['$mdThemingProvider', function($mdThemingProvider){
farnabaz / arrow.fabric.js
Created May 22, 2015
fabric.js arrow shape
View arrow.fabric.js
// Arrow for fabric.js
$.Arrow = $.util.createClass($.Line, $.Observable, {
initialize: function(e,t) {
this.callSuper("initialize", e, t)
_render: function(e) {
bennadel / ng-if-false.htm
Created Jan 12, 2015
Creating A Pre-Bootstrap Loading Screen In AngularJS
View ng-if-false.htm
<!-- BEGIN: Pre-Bootstrap Loading Screen. -->
<div ng-if="false">
This will show until the application is bootstrapped.
Then, the ngIf directive will immediately rip it out of
the page.
You can’t perform that action at this time.