Skip to content

Instantly share code, notes, and snippets.

View wwerner's full-sized avatar

Wolfgang Werner wwerner

View GitHub Profile
@wwerner
wwerner / docker-tomcat_remote-debugging.adoc
Last active June 3, 2021 18:16
Set up remote debugging for Tomcat in Docker

Set up remote debugging in dockerized Tomcat

Start Container, stock tomcat 8.5 in this example
$  docker run \
    -eJPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n" \
    -p8080:8080 \
echo .DS_Store >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
@wwerner
wwerner / settings.yml
Created November 11, 2020 07:34
Probot Settings App Label Example
labels:
- name: "T:Question ❓"
description: "Type: Question - Needs discussion w/ team and/or stakeholders"
color: E8F5E9
- name: "T:Bug 🐛"
description: "Type: Bug - Something does not work as expected"
color: E8F5E9
- name: "T:Feature ✨"
description: "Type: Feature - Provides a new feature"
@wwerner
wwerner / v-responsive-class.js
Created October 30, 2020 10:56
Provides a `v-responsive-class` Vue directive to toggle css classes based on the containing element's width.
/**
* Provides a `v-responsive-class` Vue directive to toggle css classes based on the containing element's width.
* Think @media queries, but based on the parent element. Useful for web components.
*
* The breakpoints match the ones in Bootstrap:
* * xs: < 576 - Extra small devices (portrait phones, less than 576px)
* * s: >= 576 - Small devices (landscape phones, 576px and up)
* * m: >= 768 - Medium devices (tablets, 768px and up)
* * l: >= 992 - Large devices (desktops, 992px and up)
* * xl: >= 1200 - Large desktops, 1200px and up
#!/usr/bin/env bash
# Like this script? Generate boilerplate for similar ones at https://bashplate.now.sh.
set -o errexit # exit on error
set -o nounset # don't allow unset variables
# set -o xtrace # enable for debugging
usage() {
printf "Starts a CockroachDB cluster on the current node\n\nRequires cockroach binary on the path and the ports to be available.\n"
@wwerner
wwerner / links.md
Last active March 26, 2020 18:13
vlingo/schemata links for the webinar 2020-03-26
@wwerner
wwerner / back-to-origin.sh
Created March 26, 2020 10:46
[git] stash local changes to new branch and reset the current one to its origin
# git safe origin
# -
# save local work to a separate branch and revert to the current branches origin
# I have this in my ~/.zshrc
gso()
{
branch=$(git rev-parse --abbrev-ref HEAD); qualifier=$(date -u +"%Y-%m-%dT%H%M%S") \
&& git add . \
&& git commit -m "Saving local work from $branch to local/stash/$branch-$qualifier" \
&& git branch local/stash/$branch-$qualifier \
# Concatenate multiple PDF files into one using GhostScript
gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=fileout.pdf 1.pdf 2.pdf 3.pdf ...

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

# 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)