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
def add_url_rule(self, rule, endpoint=None, view_func=None, **options): | |
"""Connects a URL rule. Works exactly like the :meth:`route` | |
decorator. If a view_func is provided it will be registered with the | |
endpoint. | |
Basically this example:: | |
@app.route('/') | |
def index(): | |
pass |
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
-P INPUT ACCEPT | |
-P FORWARD ACCEPT | |
-P OUTPUT ACCEPT |
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
import json | |
import itertools | |
from mergedict import ConfigDict | |
# minor changes to original code at http://stackoverflow.com/questions/19378143/python-merging-two-arbitrary-data-structures | |
def merge(a, b): | |
if isinstance(a, dict) and isinstance(b, dict): | |
d = dict(a) | |
d.update({k: merge(a.get(k, None), b[k]) for k in b}) | |
return d |
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
Title | |
Speaker name | |
speaker.email@id.com | |
* First slide | |
- first point | |
- second point | |
- third point |
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
\documentclass[9pt]{beamer} | |
\usepackage[latin1]{inputenc} | |
\usepackage{colortbl} | |
\usepackage[english]{babel} | |
\newcommand{\myblue} [1] {{\color{blue}#1}} | |
\newcommand{\newauthor}[4]{ | |
\parbox{0.26\textwidth}{ |
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
\documentclass[9pt]{beamer} | |
\usepackage[latin1]{inputenc} | |
\usepackage{colortbl} | |
\usepackage[english]{babel} | |
\newcommand{\myblue} [1] {{\color{blue}#1}} | |
\newcommand{\newauthor}[4]{ | |
\parbox{0.26\textwidth}{ |
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
#compdef set-aws-profile | |
_set-aws-profile() { | |
local curcontext="$curcontext" state line | |
typeset -A opt_args | |
_arguments '1: :->csi' | |
case $state in | |
csi) |
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
aws-profiles() { | |
cat ~/.aws/credentials | grep '\[' | grep -v '#' | tr -d '[' | tr -d ']' | |
} | |
set-aws-profile() { | |
local aws_profile=$1 | |
set -x | |
export AWS_PROFILE=${aws_profile} | |
set +x | |
} |
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
#compdef set-aws-profile | |
_set-aws-profile() { | |
local curcontext="$curcontext" state line | |
typeset -A opt_args | |
_arguments '1: :->csi' | |
case $state in | |
csi) |
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
#compdef set-aws-keys | |
_set-aws-keys() { | |
local curcontext="$curcontext" state line | |
typeset -A opt_args | |
_arguments '1: :->csi' | |
case $state in | |
csi) |