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 uuid | |
from .some_object import SomeObject | |
class some_lambda: | |
def __init__(self): | |
self.instance_id = uuid.uuid4() | |
self.someobject = SomeObject() |
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
1. pyenv | |
2. pipsi |
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
# Reference: https://rehansaeed.com/gitattributes-best-practices/ | |
############################### | |
# Git Line Endings # | |
############################### | |
# Set default behavior to automatically normalize line endings. | |
* text=auto | |
# Force bash scripts to always use lf line endings so that if a repo is accessed |
- gitolite - git ssh manager
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 | |
if [ "$1" == "" ]; then | |
echo "Please set the ORGANIZATION ACCOUNT_ID as the first parameter" | |
fi | |
ACCOUNT_ID=$1 | |
aws iam create-role --role-name OrganizationAccountAccessRole --assume-role-policy-document %7B%0A%20%20%22Version%22%3A%20%222012-10-17%22%2C%0A%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%22Principal%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22AWS%22%3A%20%22arn%3Aaws%3Aiam%3A%3A$ACCOUNT_ID%3Aroot%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22Action%22%3A%20%22sts%3AAssumeRole%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D | |
aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/AdministratorAccess --role-name OrganizationAccountAccessRole |
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 | |
sudo useradd --no-create-home --shell /bin/false prometheus | |
sudo mkdir /etc/prometheus | |
sudo mkdir /var/lib/prometheus | |
sudo chown prometheus:prometheus /etc/prometheus | |
sudo chown prometheus:prometheus /var/lib/prometheus | |
curl -LO https://github.com/prometheus/prometheus/releases/download/v2.6.0/prometheus-2.6.0.linux-amd64.tar.gz | |
tar xvf prometheus-2.6.0.linux-amd64.tar.gz | |
sudo cp prometheus-2.6.0.linux-amd64/prometheus /usr/local/bin/ | |
sudo cp prometheus-2.6.0.linux-amd64/promtool /usr/local/bin/ |
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
while true; do date; sleep 5; done |