This file contains hidden or 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
#!/bin/bash | |
# Install an SSH key on an instance automatically and then configure an | |
# SSM proxy to the instance which will be used by SSH. | |
# | |
# Copy this script to ~/.ssh/ssm-proxy and make it executable: | |
# | |
# chmod +x ~/.ssh/ssm-proxy | |
# | |
# This script should be set as the ProxyCommand. For example: | |
# |
This file contains hidden or 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
FROM ... | |
COPY istio-launcher.py /app/istio-launcher.py | |
ENTRYPOINT ["tini", "--", "/app/istio-launcher.py"] |
This file contains hidden or 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 argparse | |
import boto3 | |
from collections import defaultdict | |
import csv | |
from datetime import datetime, timedelta | |
import logging | |
from pprint import pprint | |
import queue | |
import signal | |
import sys |
This file contains hidden or 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
[tool.poetry] | |
name = "pyramid_scaffold" | |
version = "0.1.0" | |
description = "Pyramid Scaffold" | |
authors = [] | |
classifiers = [ | |
"Programming Language :: Python", | |
"Framework :: Pyramid", | |
"Topic :: Internet :: WWW/HTTP", | |
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application", |
This file contains hidden or 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-profile() { | |
read -r -d '' SCRIPT <<'EOF' | |
import argparse | |
from configparser import RawConfigParser | |
import os | |
import shutil | |
import subprocess | |
import sys | |
from textwrap import dedent |
This file contains hidden or 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
pre-commit: | |
image: python:3.8-buster | |
variables: | |
XDG_CACHE_HOME: ${CI_PROJECT_DIR}/.ci-cache | |
PYTHONUSERBASE: ${CI_PROJECT_DIR}/.ci-cache | |
TF_VERSION: 0.13.5 | |
PRE_COMMIT_VERSION: 2.9.0 | |
cache: | |
# bust the cache if the python version changes | |
key: ${CI_JOB_IMAGE} |
This file contains hidden or 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
from pyramid.interfaces import IResourceURL | |
from pyramid.traversal import traversal_path | |
import venusian | |
from zope.interface import implementedBy, providedBy | |
from zope.interface.interfaces import IInterface | |
class resource_config(object): | |
""" | |
A class decorator for defining resources. |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -eEo pipefail | |
SSH_TRACE= | |
[[ "$TRACE" = "1" ]] && set -x && SSH_TRACE="-vvv" | |
SSH_TARGET=merickel.org | |
CONTROL_PATH=$(pwd)/.ssh-${SSH_TARGET} | |
SOCKET_PATH=$(pwd)/docker.sock |
This file contains hidden or 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
############################################################################## | |
# Settings made available in site.ini.in. | |
# | |
# After making changes re-run render-config | |
# | |
# Override settings by making a .env.local file. | |
############################################################################## | |
DEBUG=yes | |
WEB_CONCURRENCY=10 |
This file contains hidden or 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
from myapp.services import make_service_factory | |
from myapp.utils.tm import tm_context | |
class CLI: | |
@reify | |
def service_factory(self): | |
return make_service_factory(self.settings) | |
NewerOlder