Skip to content

Instantly share code, notes, and snippets.

package com.grails3book.stripe
import com.agileorbit.gambda.ApiGatewayHandler
import com.agileorbit.gambda.ApiGatewayRequest
import com.agileorbit.gambda.ApiGatewayProxyResponse
import com.amazonaws.services.lambda.runtime.Context
import com.stripe.Stripe
import com.stripe.model.Charge
import groovy.transform.CompileStatic

Grails 3.2 Upgrade Notes

Community sourced notes on upgrades to Grails 3.2.0.

Current Release 3.2.0

Documentation & Blog posts

$ chef --version
Chef Development Kit Version: 0.15.15
chef-client version: 12.11.18
delivery version: 0.0.23 (bf89a6b776b55b89a46bbd57fcaa615c143a09a0)
berks version: 4.3.5
kitchen version: 1.10.0
$ chef verify
Running verification for component 'berkshelf'
Running verification for component 'test-kitchen'
@erichelgeson
erichelgeson / stripe.groovy
Last active May 11, 2016 02:57
Estimate Stripe fees to pass on
// based on https://support.stripe.com/questions/can-i-charge-my-stripe-fees-to-my-customers
class StripeFees {
static BigDecimal creditCardPct = 0.029
static Integer creditCardFixed = 30 // cents
static BigDecimal achPct = 0.008
static Integer achMaxFee = 500 // cents
/**
@erichelgeson
erichelgeson / sentry-docker.sh
Last active January 27, 2020 15:10
Sentry Docker
SENTRY_SECRET_KEY=longsecrethere
DOCKERPREFIX=eric
cat <<-EOF > requirements.txt
sentry-slack==0.5.0
EOF
cat <<-EOF > Dockerfile
FROM sentry:8.5-onbuild
EOF
// Taglib for Grails to create a <g:routes/> tag to allow you to output all the data you'd need to
// emulate ${createLink} in JS
// eg: $.get(baseURL + CONTROLLER_ACTION) http://localhost:8080/app/CONTROLLER/ACTION
// eg: $.get(baseURL + BOOKS_LIST) == http://localhost:8080/app/books/list
def grailsLinkGenerator
def routes = {
out << '<script type="text/javascript">'
out << "var baseUrl = '//' + window.location.host + '${request.contextPath}';"
@erichelgeson
erichelgeson / README.md
Last active April 29, 2016 09:20
Replace chef-server with consul (because why not?)

Federated Chef-server'ish with consul.

Why?

Why not? I thought it'd be interesting, and maybe useful.

Goals

  • No centralized chef-server
  • Nodes still know about eachother (so chef-searchs work)
  • Use consul-templates / services for things that need to be updated 'realtime'
  • Use chef resources for installation and configuration of the rest
### Keybase proof
I hereby claim:
* I am erichelgeson on github.
* I am erichelgeson (https://keybase.io/erichelgeson) on keybase.
* I have a public key whose fingerprint is 20D0 A95C 0704 57D3 AA21 B4EE 6252 7A7A 2BE2 EBDE
To claim this, I am signing this object: