jq is useful to slice, filter, map and transform structured json data.
brew install jq
| iptables -t filter -I OUTPUT -d 169.254.169.254 -j EC2 | |
| iptables -N EC2 | |
| iptables -A EC2 -m owner --uid-owner root -d 169.254.169.254 -j ACCEPT | |
| iptables -A EC2 -j REJECT --reject-with icmp-host-unreachable |
| import functools | |
| def force_async(fn): | |
| ''' | |
| turns a sync function to async function using threads | |
| ''' | |
| from concurrent.futures import ThreadPoolExecutor | |
| import asyncio | |
| pool = ThreadPoolExecutor() |
Picking the right architecture = Picking the right battles + Managing trade-offs
| - defaults: | |
| name: ci-workflow-provision | |
| description: | | |
| Managed by Jenkins Job Builder. Do not edit via web. | |
| concurrent: true | |
| scm: | |
| - git: | |
| url: 'https://code.engineering.redhat.com/gerrit/ci-ops-central' | |
| branches: | |
| - origin/master |
| #!/usr/bin/env/python | |
| # | |
| # More of a reference of using jinaj2 without actual template files. | |
| # This is great for a simple output transformation to standard out. | |
| # | |
| # Of course you will need to "sudo pip install jinja2" first! | |
| # | |
| # I like to refer to the following to remember how to use jinja2 :) | |
| # http://jinja.pocoo.org/docs/templates/ | |
| # |