A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Example of `adapter' design pattern | |
# Copyright (C) 2011 Radek Pazdera | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
# http://coding.smashingmagazine.com/2012/10/29/powerful-command-line-tools-developers/ | |
alias tunnel='sshuttle -D --pidfile=/tmp/sshuttle.pid -r <server> --dns 0/0' | |
alias stoptunnel='[[ -f /tmp/sshuttle.pid ]] && kill `cat /tmp/sshuttle.pid`' |
#! /usr/bin/env bash | |
HOST=example.com | |
USER=alice | |
LTUN=0 | |
RTUN=3 | |
LADDR=192.168.2.4/31 | |
RADDR=192.168.2.3 | |
HOSTADDR=$(dig $HOST +short) | |
GW=192.168.1.1 | |
FLAGS="-p7575 -N -v -w $LTUN:$RTUN" |
docker config inspect pxc_proxysql_cnf | jq '.[0].Spec.Data' -r | base64 --decode > proxysql.cfg |