Skip to content

Instantly share code, notes, and snippets.

View wwerner's full-sized avatar

Wolfgang Werner wwerner

View GitHub Profile

Keybase proof

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:

@wwerner
wwerner / docker-cleanup.sh
Created December 12, 2017 11:46
Docker: Stop all containers, remove all containers and images
#!/bin/bash
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="iso-8859-15" />
<xsl:template match="/">
<xsl:apply-templates select="´scxml" />
</xsl:template>
@wwerner
wwerner / restore-heroku-db-dump.locally.txt
Last active June 20, 2018 10:35 — forked from kagemusha/gist:1569836
Dump Heroku Postgres DB and load locally into postgres
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
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) })
#! /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
# Parse a CloudAmqp RabbitMQ URL from heroku into environment variables
# that Spring Boot understands.
export CLOUDAMQP_URL=amqp://user:pass@host/vhost
MSG_TMP=$(echo $CLOUDAMQP_URL | cut -d':' -f2- | sed 's/^\/\///')
MSG_TMP_USER_PASS=$(echo $MSG_TMP | cut -d'@' -f1)
SPRING_RABBITMQ_USERNAME=$(echo $MSG_TMP_USER_PASS | cut -d':' -f1)
SPRING_RABBITMQ_PASSWORD=$(echo $MSG_TMP_USER_PASS | cut -d':' -f2)

Florgs

Florgs helps you blarbing the faghtah' by shlorping the caboole.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

# Concatenate multiple PDF files into one using GhostScript
gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=fileout.pdf 1.pdf 2.pdf 3.pdf ...
@wwerner
wwerner / links.md
Last active March 26, 2020 18:13
vlingo/schemata links for the webinar 2020-03-26