This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
# Setup: | |
# Create .env file containing (without the #'s) | |
# TRAEFIK_DASHBOARD_DOMAIN=dashboard.domain.com | |
# TRAEFIK_DASHBOARD_ADMIN_PASSWORD=generate_this_with_htpasswd | |
# POSTGRES_PASSWORD=s3cr3tstr1ng | |
# DOMAIN=wow.domain.com | |
# LETS_ENCRYPT_EMAIL=admin@admin.tld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
spinner() { | |
# thanks to: http://fitnr.com/showing-a-bash-spinner.html | |
local pid=$1 | |
local delay=0.075 | |
local spinstr='|/-\' | |
local infotext=$2 | |
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do | |
local temp=${spinstr#?} | |
printf "[ %c ] %s" "$spinstr" "$infotext" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// | |
// 1. Put this in the file that gets first loaded by RequireJS | |
// 2. Once the page has loaded, type window.rtree.map() in the console | |
// This will map all dependencies in the window.rtree.tree object | |
// 3. To generate UML call window.rtree.toUml(). The output can be used | |
// here: http://yuml.me/diagram/scruffy/class/draw | |
requirejs.onResourceLoad = function (context, map, depMaps) { | |
if (!window.rtree) { | |
window.rtree = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.REQUEST.response.setHeader('Content-Type', 'text/plain') | |
print "digraph %s {" % context.getId() | |
wf = context | |
state_to_trans = [] | |
for state in wf.states.values(): | |
roles = state.getAvailableRoles() | |
roles.sort() | |
permtable = [ ['<FONT POINT-SIZE="10">%s</FONT>' % _ for _ in ['permission', 'acquired'] + roles ] ] | |
for perm in state.getManagedPermissions(): | |
pinfo = state.getPermissionInfo(perm) |