Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
import boto3 | |
import base64 | |
if __name__ == '__main__': | |
session = boto3.session.Session() | |
kms = session.client('kms') | |
encrypted_password = 'AQECAHjgTiiE7TYRGp5Irf8jQ3HzlaQaHGYgsUJDaavnHcFm0gAAAGswaQYJKoZIhvcNAQcGoFwwWgIBADBVBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDDwxVQuG0oVwpkU7nQIBEIAoVGk1/wpserb+GVUOzE7PiL/Nr9fTDFKZfpKpF0ip2ct4B2q0Wn6ZZw==' | |
binary_data = base64.b64decode(encrypted_password) |
export PYENV_ROOT="${HOME}/cache/.pyenv" | |
if [ -d ${PYENV_ROOT} ]; then (cd ${PYENV_ROOT}; git pull --rebase); else git clone https://github.com/yyuu/pyenv.git ${PYENV_ROOT}; fi | |
export PATH="${PYENV_ROOT}/bin:${PATH}" | |
eval "$(pyenv init -)" | |
pyenv install -s; echo 'lofasz' | |
pip install --upgrade pip setuptools | |
[ -f requirements.txt ] && pip install -r requirements.txt | |
[ -f requirements.development.txt ] && pip install -r requirements.development.txt |
from troposphere import Template | |
from troposphere.waf import IPSet | |
t = Template() | |
t.add_description("CF Template for setting IP ranges for whitelisting on the WAF.") | |
Whitelist1 = t.add_resource(IPSet( | |
"internaladdresses", | |
Name="Internal_addresses", |
MIT License
Copyright (c) 2018 Josh Bode
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
# How to generate a secret key with Python | |
# via http://flask.pocoo.org/docs/quickstart/ | |
import os | |
os.urandom(24) |