Skip to content

Instantly share code, notes, and snippets.

View lasergoat's full-sized avatar

Daniel lasergoat

  • Fattmerchant
  • US
View GitHub Profile
@lasergoat
lasergoat / machine.js
Last active May 4, 2021 01:21
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@lasergoat
lasergoat / eb-error-package-not-found.md
Last active February 2, 2019 02:35
Elastic Beanstalk EB NPM Package Not Found 404 Error (code E404)

Elastic Beanstalk keeps trying to install a non-existing npm package version

npm ERR! code E404
npm ERR! 404 Not Found: event-stream@https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/.npm/_logs/2019-02-02T01_46_34_063Z-debug.log
Failed to run npm install. Snapshot logs for more details.
No environment variable EB_EVENT_FILE found. Writing message to stderr.
Verifying my Blockstack ID is secured with the address 1KD2iGKezHV6aJh24cpunD2rJVkRK8efMX https://explorer.blockstack.org/address/1KD2iGKezHV6aJh24cpunD2rJVkRK8efMX
@lasergoat
lasergoat / convert.py
Created September 15, 2017 17:18
convert a csv to json
#!/usr/bin/python
import csv
import json
header = []
results = []
print "["
with open('data.csv', 'rb') as f:
@lasergoat
lasergoat / index.js
Created August 24, 2017 17:14
oauth with passport for intuit
const auth = require('./util/auth-util');
const merchant = require('./util/merchant-util');
const session = require('express-session');
const passport = require('passport');
const IntuitStrategy = require('passport-intuit-oauth').Strategy;
const port = process.env.PORT || 3000;
console.info(['STARTUP ENVIRONMENT: ', process.env.NODE_ENV || 'unknown'].join(' '));
@lasergoat
lasergoat / commands.sh
Last active March 3, 2017 17:16
Steps to Install or Update PHP
# in terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# from: https://developerjack.com/blog/2016/08/26/Installing-PHP71-with-homebrew/
brew update
brew upgrade
brew tap homebrew/dupes
@lasergoat
lasergoat / s3-lib.js
Created March 1, 2017 18:37
upload to s3 then move
// https://github.com/andrewrk/node-s3-client
import path from 'path';
import s3 from 's3';
require('dotenv').config({'path': path.resolve('./.env')});
const debug = require('debug')('emaf');
const client = s3.createClient({
@lasergoat
lasergoat / rrf-reset.log
Created December 10, 2016 18:41
redux actions showing rrf/reset issue
action @ 12:40:20.638 rrf/reset
prev state Object {auth: Object, analytics: Object, loginUser: Object, registerUser: Object, registerMerchant: Object…}
action Object {type: "rrf/reset", model: "payment"}
next state Object {auth: Object, analytics: Object, loginUser: Object, registerUser: Object, registerMerchant: Object…}
action @ 12:40:20.654 rrf/reset
prev state Object {auth: Object, analytics: Object, loginUser: Object, registerUser: Object, registerMerchant: Object…}
action Object {type: "rrf/reset", model: "customer"}
next state Object {auth: Object, analytics: Object, loginUser: Object, registerUser: Object, registerMerchant: Object…}
action @ 12:40:20.663 rrf/reset
prev state Object {auth: Object, analytics: Object, loginUser: Object, registerUser: Object, registerMerchant: Object…}
@lasergoat
lasergoat / schedule-form-component.js
Created November 30, 2016 16:32
schedule form loop / onUpdate issue
// USAGE:
// |
// /-> rrule (text)
// ^ \-> displays sentance
// ^ \-> change settings
// ^ \-> change rrule -
// ^ |
// \--<--<--<--<--<--<---/
class ScheduledInvoiceForm extends React.Component {
@lasergoat
lasergoat / run-in-console.js
Created August 31, 2016 14:15
Shopify's BOLD Product Options SCRIPT SETUP (hack)
// the goal of this script is to save you time when using BOLD product options
// for your shopify store. it currently only works for drop down options.
// run it in your browser's console on the "create option" page in the bold app.
// fill out the values for these three variables:
// 1. internalName
// 2. publicName
// 3. options