-
Class: A blueprint for creating objects (specific instances) with certain properties and methods. It's like a template for building objects.
class Car: pass
-
Object: An instance of a class. It's like building a car using the
Car
blueprint.
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
# Tutorial https://www.daimto.com/how-to-get-a-google-access-token-with-curl/ | |
# YouTube video https://youtu.be/hBC_tVJIx5w | |
# Client id from Google Developer console | |
# Client Secret from Google Developer console | |
# Scope this is a space seprated list of the scopes of access you are requesting. | |
# Authorization link. Place this in a browser and copy the code that is returned after you accept the scopes. | |
https://accounts.google.com/o/oauth2/auth?client_id=[Application Client Id]&redirect_uri=http://127.0.0.1&scope=[Scopes]&response_type=code | |
# Exchange Authorization code for an access token and a refresh token. |
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
# sh -c "$(curl -fsSL https://gist.githubusercontent.com/gjgd/5a08da85a98bf147294f331461e44d1f/raw/a63bf0f4169a8ab651adfa0a56e676e6bc465876/setup-github-action-runner.sh)" | |
# Update instance | |
sudo apt update -y | |
sudo apt upgrade -y | |
# Install latest version of git | |
sudo add-apt-repository ppa:git-core/ppa -y | |
sudo apt-get update | |
sudo apt-get install git -y |
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 asyncio | |
from typing import Coroutine, List, Sequence | |
def _limit_concurrency( | |
coroutines: Sequence[Coroutine], concurrency: int | |
) -> List[Coroutine]: | |
"""Decorate coroutines to limit concurrency. | |
Enforces a limit on the number of coroutines that can run concurrently in higher |
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 https://andyhunt.me/til/2021/03/04/you-can-fully-validate-a-complex-input-object-in-terraform/ | |
You can fully validate a complex input object in Terraform | |
Posted: Thursday 04 March 2021 @ 12:12:55 | |
Terraform allows you to define your inputs as arbitrarily complex objects and lists of objects. For example, consider the following: | |
variable "instances" { | |
type = list(object({ | |
name = string |
I often get asked which tools are good to use for securing your AWS infrastructure so I figured I'd write a short listof some useful Security Tools for the AWS Cloud Infrastructure.
This list is not intended be something completely exhaustive, more so provide a good launching pad for someone as they dig into AWS and want to make it secure from the start.
This section focuses on tools and services provided by the community and released as open-source.
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
variable "aws_lb_listener_arn" { | |
description = "ARN of the ALB listener to include rules into" | |
type = "string" | |
} | |
variable "okta_auth_server_base_url" { | |
description = "Base URL of Okta's authorization server" | |
type = "string" | |
} |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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
# install https://pypa.github.io/pipx/ | |
pipx install git+https://github.com/jonathanhle/aws-sso-config-generator#subdirectory=src | |
generate-aws-sso-config --start-url https://SSO_SITE.awsapps.com/start --output json --region us-east-1 --sso-region us-east-1 | |
eval $(aws-sso-creds --profile SecurityProd-Administrator export) |
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
https://appletoolbox.com/record-screen-internal-audio-mac/#Download_and_Install_BlackHole |