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
View Async error handling
async function startTask(req) {
const {
params: {
} = req;
const user = await getUser(userId)
.catch((e) => {
morgs32 / cssTransform.js
Created Mar 28, 2018
To enable jest snapshots to imitate CSS module classnames
View cssTransform.js
'use strict';
// This is a custom Jest transformer turning style imports into empty objects.
const path = require('path');
module.exports = {
process(src, filename, config, options) {
return `
morgs32 / until.js
Created Jul 24, 2017 — forked from matthieuprat/
Until operator for Enzyme's shallow wrapper
View until.js
export default function until(selector, {context} = this.options) {
if (this.isEmptyRender() || typeof this.node.type === 'string')
return this
const instance = this.instance()
if (instance.getChildContext) {
context = {
View expandableTable.scss
.expandableTable {
margin-bottom: 0;
margin-top: -36px;
composes: table from './tables.scss';
background: #eee;
morgs32 /
Last active Jul 11, 2016
CSS Best Practices

No css on tags (h2, h4, etc) almost all CSS methologies recommend flat structures in the vein of:

morgs32 / gulpfile.js
Created May 24, 2015
This gulp file will create svg iconsets out of material icons to use with $mdIconProvider in angular-material
View gulpfile.js
//to use in angular-material as described here:$mdIconProvider
//the icons you get from bower install material-design-icons
var gulp = require('gulp');
var tap = require("gulp-tap");
var path = require("path");
var fs = require('fs-extra');
var replaceAll = function(s, target, replacement) {
You can’t perform that action at this time.