Skip to content

Instantly share code, notes, and snippets.

View jensens's full-sized avatar
🕶️
Available for training, coaching and trouble-shooting (as usual)..

Jens W. Klein jensens

🕶️
Available for training, coaching and trouble-shooting (as usual)..
View GitHub Profile
@peterrus
peterrus / docker-compose.yml
Last active November 1, 2022 23:16 — forked from smashnet/docker-compose.yml
Docker-Compose: Mastodon v3.1.3 with Traefik v2
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
@dustinboston
dustinboston / rtree.js
Created August 7, 2012 19:50
Generate dependency tree for RequireJS apps
// 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 = {};
@jensens
jensens / dcwf2dot.py
Created March 1, 2012 22:57
generates dot file from workflows (zope python script)
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)
@saily
saily / update.sh
Last active August 29, 2015 14:07
Update buildout including all sources in src dir
#!/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"