Skip to content

Instantly share code, notes, and snippets.

@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
@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
/**
$ 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'

Grails 3.2 Upgrade Notes

Community sourced notes on upgrades to Grails 3.2.0.

Current Release 3.2.0

Documentation & Blog posts

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
@erichelgeson
erichelgeson / Grails 3.3.3 Upgrade Notes.md
Last active June 6, 2018 21:33
Grails 3.3.x Upgrade Notes

3.3.3 - Current

  • 3.3.0- 07/26/2017
  • 3.3.0.RC1 - Current release 06/26/2017
  • 3.3.0.M2 - Current release 05/30/2017
  • 3.3.0.M1 - Released 05/09/2017

Please fork or leave a comment on this gist to add any other issues or notes you've encountered when upgrading to 3.3.

Documentation

@erichelgeson
erichelgeson / SameSiteCookieFilter.groovy
Last active July 18, 2017 17:01
Filter to add SameSite to SESSION cookies in grails/boot
package web.http
import groovy.transform.CompileStatic
import org.springframework.web.filter.GenericFilterBean
import javax.servlet.FilterChain
import javax.servlet.ServletException
import javax.servlet.ServletRequest
import javax.servlet.ServletResponse
import javax.servlet.http.Cookie