Skip to content

Instantly share code, notes, and snippets.

View mystygage's full-sized avatar

Markus mystygage

  • Cologne, Germany
View GitHub Profile
@mystygage
mystygage / script-template.sh
Created October 10, 2021 15:51 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@mystygage
mystygage / docker-compose.yml
Created March 6, 2017 21:02
Microsoft SQL Server in Docker with data volume
version: '3'
services:
mssql-server-linux:
image: microsoft/mssql-server-linux:latest
volumes:
- mssql-server-linux-data:/var/opt/mssql/data
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=${SQLSERVER_SA_PASSWORD:-yourStrong(!)Password}
@mystygage
mystygage / dbvis.sh
Created July 12, 2016 14:09
Startup script for DBVisualizer
#!/bin/sh
# Script to launch DbVisualizer by manually invoking Java
# Please note that it's *not* recommended to launch DbVisualizer
# with this script. Instead use the "dbvis" launcher on UNIX/Linux
# or the command "open DbVisualizer.app" on Mac OS X.
if [ -z "$DBVIS_HOME" ] ; then
DBVIS_HOME=`dirname $0`
#!/bin/bash
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin)
CATALINA_HOME=/Users/username/tomcat
function shutdown() {
date
echo "Shutting down Tomcat"
$CATALINA_HOME/bin/catalina.sh stop
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr %cn" $branch | head -n 1` \\t$branch; done | sort -r
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@mystygage
mystygage / readme.md
Created October 30, 2012 16:27
Working with Forks

Initial steps

  • fork the repository
  • clone fork git clone git@github.com:mystygage/repo.git
  • add remote upstream git remote add upstream git://github.com/user/repo

Stay up to date

  • switch to master
  • git pull --ff-only upstream master
  • git push origin master