Skip to content

Instantly share code, notes, and snippets.

View brianneisler's full-sized avatar
🏠
Working from home

Brian Neisler brianneisler

🏠
Working from home
View GitHub Profile
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Exception processing file google/base.js Exception: class java.lang.NullPointerException Exception message: null
   at com.sproutinc.publish.impl.CreativePublishServiceImpl.publish(CreativePublishServiceImpl.java:92)
   at com.sproutinc.publish.impl.CreativePublishFacadeImpl.publish(CreativePublishFacadeImpl.java:76)
   at com.sproutinc.rest.controller.PublishController.publishInternal(PublishController.java:87)
   at com.sproutinc.rest.controller.PublishController.publish(PublishController.java:59)
   at com.sproutinc.rest.controller.PublishController$$FastClassByCGLIB$$be91bf1d.invoke(<generated>)
   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMeth
java.lang.AssertionError:
Expected: a string containing "<!DOCTYPE html>"
but: was "<html><head><title>Apache Tomcat/7.0.37 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /service/login.html</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/service/login.html</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><HR size="1" noshade=
var test = "wtf";
@brianneisler
brianneisler / cheat-sheet.js
Last active November 27, 2022 08:23
Cheat sheet - es6 import/export mixed with require/modules.exports
require('./module.js') // { a: 1 }
import module from './module.js' // undefined
import { a } from './module.js' // 1
require('./module2.js') // { default: { a: 1 }, b: 2 }
import module2 from './module2.js' // { a: 1}
import { b } from './module2.js' // 2
require('./module3.js') // { default: { a: 1 }, b: 2 }
@brianneisler
brianneisler / compose.js
Last active December 19, 2016 20:53
Use recompose core as test enhancer (using Mocha)
export default function compose(...funcs) {
if (funcs.length === 0) {
return arg => arg
}
if (funcs.length === 1) {
return funcs[0]
}
const last = funcs[funcs.length - 1]
@brianneisler
brianneisler / initial-setup.md
Last active July 30, 2018 16:39
Workshop - Setting Up the Serverless Framework

Initial Setup

End Results

  • Should have node 8.11.3 or later installed
  • Should have a new AWS IAM User with full admin privileges
  • Should have a text editor installed
  • Should have the serverless framework installed
  • Should have your AWS credentials configured in serverless

Install node js and NPM

Examples

REST API

Platform

service:
  name: my-service
  provider: aws   # default for all functions in the service
@brianneisler
brianneisler / promiseMiddleware.js
Created March 2, 2018 06:02
Promise Middleware
import isPromise from 'is-promise';
const defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED'];
export default function promiseMiddleware() {
return ({dispatch, getState}) => {
return next => action => {
if (typeof action === 'function') {
return action(dispatch, getState);
}

Usage

  1. Create a new Serverless service and change into the directory.
serverless create --template hello-world
  1. Install the plugin: (needs Node version 7+)
@brianneisler
brianneisler / serverless.yml
Last active October 13, 2018 19:47
General serverless function abstractions
name: SimpleService
extends: Service
compute:
type: AwsLambdaCompute
inputs:
provider: ${inputs.providers.aws}
runtime: nodejs
functions: