Added some endpoints to make scripting Packer or Serf installs easier:
http://downloads.packer.io/latest/darwin/amd64
http://downloads.packer.io/v/0.3.10/darwin/amd64
etc. Just replace the version and platform with the one you want.
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
Added some endpoints to make scripting Packer or Serf installs easier:
http://downloads.packer.io/latest/darwin/amd64
http://downloads.packer.io/v/0.3.10/darwin/amd64
etc. Just replace the version and platform with the one you want.
| # A guide to prevent pain and suffering while upgrading to OS X Mavericks | |
| # This will vary greatly depending on system set up, so read the instructions carefully | |
| # Back up Virtulenvs | |
| #################### | |
| # Very important! | |
| # For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv | |
| # in order to prevent loss of dependencies during the upgrade. |
The best way to learn Python is to write Python, but these guides will provide an excellent starting point for the library landscape, coding standards, and community. This is by no means comprehensive! Once this is in an actual repository I will gladly accept relevant modifications.
The Hitchhiker’s Guide to Python!
"This opinionated guide exists to provide both novice and expert Python developers a best-practice handbook to the installation, configuration, and usage of Python on a daily basis."
| # turn dict into an object that allows access to nested keys via dot notation | |
| # from http://stackoverflow.com/questions/3797957/python-easily-access-deeply-nested-dict-get-and-set | |
| # made three modifications: | |
| # --added `get()` method | |
| # --added `if not dict.__contains__...` to `__contains__()` | |
| # --can now accept None as key | |
| class dotdictify(dict): | |
| def __init__(self, value=None): | |
| if value is None: | |
| pass |
| PARSERS = [('pkg_resources', 'parse_version'), ('distutils.version', 'StrictVersion')] | |
| def get_parse_fn(): | |
| for parser_module, parser in PARSERS: | |
| try: | |
| return getattr(importlib.import_module(parser_module), 'parser') | |
| except ImportError: | |
| pass | |
| raise Exception("Couldn't find a thing to do the thing") |
| # D-I config version 2.0 | |
| default debian/7.4/amd64/boot-screens/vesamenu.c32 | |
| prompt 1 | |
| timeout 300 | |
| menu title - Boop Menu - | |
| label Debian-7.4 | |
| menu label ^0 Debian 7.4 | |
| #include debian/7.4/amd64/boot-screens/menu.cfg | |
| kernel debian/7.4/amd64/linux |
| # | |
| # Name: nginx-tls.conf | |
| # Auth: Gavin Lloyd <gavinhungry@gmail.com> | |
| # Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
| # | |
| # Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
| # to SSL/TLS are not included here. | |
| # | |
| # Additional tips: | |
| # |
| EXAMPLE: | |
| (keystone-v3-setup.sh script will perform first few steps using role 'admin') | |
| # Create a domain named d1 (note use of --os-url and --os-token to manage keystone) | |
| anc@u128:~$ openstack --os-url http://u132.localdomain:5000/v3 --os-identity-api-version 3 --os-token=ADMIN domain create d1 | |
| +---------+----------------------------------------------------------------------------------------+ | |
| | Field | Value | | |
| +---------+----------------------------------------------------------------------------------------+ |
| ''' | |
| Created on Dec 16, 2013 | |
| @author: Gil Vernik | |
| ''' | |
| from swiftclient import client as c | |
| import os | |
| import tempfile | |
| import random |