Skip to content

Instantly share code, notes, and snippets.

"""
Requires python3 and pandas.
Add this to a file:
PS4='+ $EPOCHREALTIME\011 '
exec 3>&2 2>/tmp/bashstart.$$.log
set -x
...
set +x
<style>
wbsDiagram {
node {
Padding 15
Margin 15
BackGroundColor lightblue
LineColor Black
}
rootNode {
Padding 15
''
'' superhero theme based off of the bootstrap theme of the same name
'' https://bootswatch.com/superhero/
''
'' Author: Brett Schwarz
'' Copyright (c) 2019 by Brett Schwarz
!$THEME = "superhero-outline"
!if %not(%variable_exists("$BGCOLOR"))
' Not-ugly plantuml style defaults
skinparam style strictuml
skinparam defaultFontName Helvetica
skinparam sequenceMessageAlign center
skinparam monochrome true
skinparam shadowing false
skinparam roundcorner 8
skinparam ParticipantPadding 40
skinparam BoxPadding 40
@dnordberg
dnordberg / yandex_email_for_domain_settings.py
Created April 13, 2020 11:36 — forked from nskeip/yandex_email_for_domain_settings.py
Django SMTP settings for yandex_for_domain mail (pdd.yandex.ru)
EMAIL_HOST = 'smtp.yandex.ru'
EMAIL_HOST_USER = 'login@example.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_PORT = 465
EMAIL_USE_TLS = True
@dnordberg
dnordberg / setup_shipyard_centos_7.sh
Last active July 24, 2018 21:46
setup shipyard on centos 7
!#/bin/bash
# Install docker, docker-compose, shipyard, fix ip4
yum -y update
mkdir /etc/systemd/system/docker.service.d
tee /etc/systemd/system/docker.service.d/docker.conf <<-'EOF'
[Service]
ExecStart=
@dnordberg
dnordberg / meteor-account-verify.js
Created August 2, 2016 21:13 — forked from olizilla/meteor-account-verify.js
Only allow users on a given email domain to log in to your meteor app.
/*
Only allow users with a verified email address on a pre-verified domain to log in.
We're getting people to authenticate and only authorising those that have an email we recognise.
Assumes a Meteor.settings like:
{ adminDomains: ['tableflip.io', 'meteor.com'] }
...and meteor-developer accounts, but other login mechanisms (email, twitter) would work too.
*/
@dnordberg
dnordberg / trypy
Created February 21, 2014 20:30 — forked from naftaliharris/trypy
#!/bin/bash
# An enhancement to the "python" executable that automatically launches you into the python debugger on error.
#
# Use it like you would the "python" executable, for example:
# $ trypy somefile.py
# or
# $ trypy somefile.py arg1 arg2
#
# EXAMPLE:

Open the postgresql.conf config file:

$> mate /usr/local/var/postgres/postgresql.conf

Uncomment the line with 'log_destination' and set it to 'syslog'

log_destination = 'syslog'

Open the syslog config:

@dnordberg
dnordberg / api_docs.py
Last active May 9, 2016 22:43
Generate Swagger documentation stubs for flask-restless.
# Script used to help generate Swagger docs.
import re
import os
import argparse
import urlparse
import simplejson
from collections import defaultdict
from sqlalchemy.ext.declarative.api import DeclarativeMeta