- 1. DON'T BE COMPLACENT, IMPLEMENT CHANGES
- 2. IF YOU ARE DOING SOMETHING OFTEN, AND IT'S PAINFUL, AUTOMATE IT
- 3. KEEP LEARNING
- 4. YOU DON'T KNOW EVERYTHING, AND YOU WON'T KNOW EVERYTHING
- 5. LEARN HOW TO ASK QUESTIONS
- 6. BREAK THINGS
- 7. INSTALL LINUX ON YOUR MACHINE (DELETE WINDOWS)
- 8. DON'T BE AFRAID TO GO HIGH WITH YOUR SALARY EXPECTATIONS
- 9. DON'T GO TOO DEEP INTO SOMETHING
- 10. FAKE IT TILL YOU MAKE IT (SOMETIMES)
This file contains 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
============================= test session starts ============================== | |
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /home/felipe/.local/share/virtualenvs/moto-rPH6taE9/bin/python | |
cachedir: .pytest_cache | |
rootdir: /home/felipe/repos/moto, configfile: pytest.ini | |
plugins: forked-1.4.0, cov-3.0.0, xdist-2.5.0 | |
collecting ... collected 58 items | |
tests/test_logs/logs_test.py::test_describe_metric_filters_happy_prefix PASSED | |
tests/test_logs/logs_test.py::test_describe_metric_filters_happy_log_group_name PASSED | |
tests/test_logs/logs_test.py::test_describe_metric_filters_happy_metric_name PASSED |
This file contains 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
--- | |
# | |
# Run this command on your local laptop to: | |
# 1. Create Remote "Origin" for codecommit repo | |
# 2. Configure Credential Helper for IAM authentication to repository. | |
# | |
- hosts: 'youi-ops-np' | |
connection: local | |
tasks: |
This file contains 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
[alias] | |
# Basically `log --oneline --decorate --graph` with different colors and some additional info (author and date) | |
lg = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ar)%C(reset) %C(auto)%d%C(reset)' | |
# lg (see above) with --first-parent | |
lgp = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ar)%C(reset) %C(auto)%d%C(reset)' --first-parent | |
# List every branch, local and remote, in order of most recent to oldest commit, showing the branch's last commit and some last commit meta-data | |
br = for-each-ref --sort=-committerdate refs/heads/ refs/remotes/origin/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' - |
This file contains 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
urlencode() { | |
# urlencode <string> | |
old_lc_collate=$LC_COLLATE | |
LC_COLLATE=C | |
local length="${#1}" | |
for (( i = 0; i < length; i++ )); do | |
local c="${1:i:1}" | |
case $c in | |
[a-zA-Z0-9.~_-]) printf "$c" ;; |
This file contains 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
""" | |
Lambda invocation to set security tags on Athena output; triggered by S3 Object | |
events | |
""" | |
import logging | |
import boto3 | |
LOGGER = logging.getLogger() |
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Id": "Policy1523289797898", | |
"Statement": [ | |
{ | |
"Sid": "DenyRestrictedResultsAccess", | |
"Effect": "Deny", | |
"NotPrincipal": { | |
"AWS": [ | |
"arn:aws:iam::{{ aws_account_id }}:user/{{ aws_user_name }}" |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
The security group and Network ACLs parts of CloudFormation templates can be difficult to read. This template containing Jinja macros converts easier-to-read YAML dictionaries of security group and NACL rules into JSON.
Here ais a generic macro template and some example files showing how to use it.
- cloudformation.macros.j2 - the macros
- cf_vars.yml - YAML dictionaly of security groups and NACLs, including some complex rules for both
- test.template.j2 - a simple CloudFormation template that uses the macro file
- cf_test.yml - a simple Ansible playbook that generates CloudFormation JSON from thr previous file.
-
Taking Gmail as an example, put the following into
/etc/postfix/main.cf
.relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_mechanism_filter = plain smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt smtp_use_tls = yes
smtp_tls_security_level = encrypt
NewerOlder