I hereby claim:
- I am wwerner on github.
- I am wgw (https://keybase.io/wgw) on keybase.
- I have a public key ASCGLdmzXqy2Ax5008dkCKvo5Tp3QJYbMjYH2znhErRhyAo
To claim this, I am signing this object:
#! /bin/echo Usage:. | |
# | |
# getopts_long -- POSIX shell getopts with GNU-style long option support | |
# | |
# Copyright 2005-2009 Stephane Chazelas <stephane_chazelas@yahoo.fr> | |
# | |
# Permission to use, copy, modify, distribute, and sell this software and | |
# its documentation for any purpose is hereby granted without fee, provided | |
# that the above copyright notice appear in all copies and that both that | |
# copyright notice and this permission notice appear in supporting |
FROM golang:1.11.2 as build-image | |
WORKDIR /go/src | |
RUN go get -d -v golang.org/x/net/html | |
COPY app.go . | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app app.go | |
FROM alpine:latest | |
RUN apk --no-cache add ca-certificates | |
WORKDIR /root/ | |
COPY --from=build-image /go/src/app . |
const CFG = require('../codecept.conf.js').config.myConfig | |
const MailSlurpClient = require('mailslurp-client') // https://www.npmjs.com/package/mailslurp-client | |
const emailApi = new MailSlurpClient.InboxcontrollerApi() | |
var assert = require('assert') | |
class EmailHelper extends Helper { // eslint-disable-line no-undef | |
async setupMailbox () { | |
var data = | |
await emailApi.createRandomInboxUsingPOST(CFG.emailApiKey) | |
.catch(err => { console.log(err); assert.fail(err) }) |
Get the Heroku db as detailed here: | |
http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup | |
$ heroku pg:backups:capture # outputs backup_num in the last line | |
$ heroku pg:backups:url <backup_num> #=> backup_url | |
$ curl -o /tmp/latest.dump <backup_url> | |
Then locally do: | |
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb /tmp/latest.dump |
FROM openjdk:8-jdk-alpine | |
VOLUME /tmp | |
# see https://devcenter.heroku.com/articles/exec#enabling-docker-support | |
RUN apk add --no-cache curl bash openssh python | |
ADD src/main/docker/heroku-exec.sh /app/.profile.d/heroku-exec.sh | |
RUN chmod a+x /app/.profile.d/heroku-exec.sh | |
ADD src/main/docker/sh-wrapper.sh /bin/sh-wrapper.sh | |
RUN chmod a+x /bin/sh-wrapper.sh |
#!/bin/bash | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
docker rmi $(docker images -q) |
<databaseChangeLog | |
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" | |
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd | |
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd" | |
objectQuotingStrategy="QUOTE_ALL_OBJECTS"> | |
<changeSet id="1" author="wwerner"> | |
<comment>Spring Security Authentication - Users, Authorities and ACLs</comment> |
# Two possibilities to parse a Postgres DB URL from heroku into environment variables | |
# that Spring Boot understands. | |
# You would need that, if you do not build on heroku but push docker images | |
# from another source | |
# Does not need bash. Works on alpine linux / busybox. Tested with openjdk:8-jdk-alpine base image. | |
export DATABASE_URL=postgres://user:password@host:port/database | |
# Naive way, would break with [@:/] in username or password. | |
DB_TYPE=$(echo $DATABASE_URL | awk -F'[:@/]' '{print $1}')"ql" |
I hereby claim:
To claim this, I am signing this object:
Straight from the programming trenches, The Pragmatic Programmer: From Journeyman to Master cuts through the increasing specialization and technicalities of modern software development to examine the core process—what do you do, as an individual and as a team, if you want to