Skip to content

Instantly share code, notes, and snippets.

View mikeumus's full-sized avatar
🎯
Focusing

Michael Duane Mooring mikeumus

🎯
Focusing
View GitHub Profile
resource "cloudflare_filter" {
description = ""
expression = "(http.request.uri.path eq \"/api/traces\")"
}
resource "cloudflare_filter" {
description = ""
expression = "(http.host in {\"trace.filevacuum.com\"} and not cf.tls_client_auth.cert_verified)"
}
@mikeumus
mikeumus / deep-search.js
Last active September 17, 2018 13:55
WiP - Find a value and the deep path to it in a object.
function pullKeys(obj, results, path) {
var breadcrumb = path;
for (var prop in obj) {
if (obj.hasOwnProperty(prop)) {
// path = breadcrumb ? breadcrumb ? path : prop : path;
// console.log('\n\n path: \n', path, '\n\n');
if (typeof obj[prop] === "object") {
path = path ? breadcrumb ? breadcrumb += `.${prop}` : path += `.${prop}` : prop;
pullKeys(obj[prop], results, path);
} else {
@mikeumus
mikeumus / styles.less
Last active August 16, 2018 20:33
atom editor styles
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
plugins: [
'hypercwd',
'hyper-search',
'hyper-pane',
'hyper-statusline',
'hyper-sync-settings',
'hyperterm-tabs',
'hyper-startup',
'hyper-tab-icons',
'hyper-transparent'
@mikeumus
mikeumus / rc-install-packages.sh
Created April 28, 2018 09:22
missing rc packages needed
meteor npm install --save @babel/runtime simpl-schema react lodash accounting-js later i18next react-router-dom react-router history path-to-regexp query-parse immutable react-dom handlebars nodemailer-wellknown node-fetch sharp connect body-parser connect-route libphonenumber-js transliteration slugify node-geocoder fibers deep-diff prerender-node cors express apollo-server-express ramda cuid es6-error graphql-tools graphql-iso-date graphql moment shopify-api-node authorize-net braintree paypal-rest-sdk stripe shippo flatten-obj twilio nexmo
@mikeumus
mikeumus / Uncaught Error: Cannot find module 'http'
Created April 26, 2018 05:05
Reaction Commerce 1.11.0 upgrade error: Uncaught Error: Cannot find module 'http'
modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:241 Uncaught Error: Cannot find module 'http'
at makeMissingError (modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:241)
at require (modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:251)
at format-record.js (modules.js?hash=a6871893979f0726a13eee26eb39fd11ef2cb057:113177)
at fileEvaluate (modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:353)
at require (modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:248)
at index.js (modules.js?hash=a6871893979f0726a13eee26eb39fd11ef2cb057:113108)
at fileEvaluate (modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:353)
at require (modules-runtime.js?hash=9f9bb5e055614ddf4eb3e743737b7a5b3cfd9d34:248)
at main.js (modules.js?hash=a6871893979f0726a13eee26eb39fd11ef2cb057:48886)
@mikeumus
mikeumus / Products.json
Last active March 9, 2018 20:46
Trying to import a product and it's many options.
{ "_id" : "Faux-Wood-Blinds", "title" : "Faux Wood Blinds", "shopId" : "J8Bhq3uTtdgwZx3rz", "ancestors" : [], "createdAt" : Date( 1396558012411 ), "description" : "Moisture Resistant\nHot and steamy? Faux wood is great for bathrooms, kitchens, and garages.\nSuper Durable\nDoes your home feel like a circus sometimes? Scratch and moisture-resistant PVC can stand up to almost anything.\nBudget Friendly, On a budget? No worries. For the same look, faux wood blinds cost less than real wood blinds. Easy to Clean, An easy wipe down is all that's needed to make your oh-so-pretty blinds sparkle.", "handle" : "example-product", "hashtags" : [ "rpjCvTBGjhBi2xdro", "cseCBSSrJ3t8HQSNP" ], "price" : { "range" : "12.99 - 19.99", "min" : 12.99, "max" : 19.99 }, "isVisible" : true, "isLowQuantity" : false, "isSoldOut" : false, "isBackorder" : false, "metafields" : [ { "key" : "Material", "value" : "Cotton" }, { "key" : "Quality", "value" : "Excellent" } ], "pageTitle" : ".", "type" : "simple", "updatedAt" : Date( 151303495747
@mikeumus
mikeumus / table-test-helper.go
Last active February 13, 2018 02:38
An attempt at a helper function for table driven tests in go.
package gopol
import (
// "fmt"
// "io"
// "log"
// "bytes"
// "fmt"
// "log"
// "bufio"
@mikeumus
mikeumus / .bashrc
Last active December 20, 2017 17:37
Mikeumus' .bashrc scripts
function gitRe() {
git st
git co develop
git pl origin develop
}
# Assumes Jest
# https://facebook.github.io/jest
function deJ() {
node --debug-brk ./node_modules/bin/jest.js -i --watch
@mikeumus
mikeumus / gitMe.sh
Last active August 31, 2018 15:43
A script to run on new mahcines to setup git aliases - http://bit.ly/git-me
#!/bin/bash
# Run this script like this:
# curl http://bit.ly/git-me | sh
cat > ~/.gitconfig <<EOF
[user]
name = mikeumus
email = mikeumus@gmail.com
[alias]
co = checkout