A curated list of awesome Python frameworks, libraries, software and resources.
Inspired by awesome-php.
| pm.sendRequest({ | |
| url: 'https://login.microsoftonline.com/' + pm.environment.get("tenantId") + '/oauth2/token', | |
| method: 'POST', | |
| header: 'Content-Type: application/x-www-form-urlencoded', | |
| body: { | |
| mode: 'urlencoded', | |
| urlencoded: [ | |
| {key: "grant_type", value: "client_credentials", disabled: false}, | |
| {key: "client_id", value: pm.environment.get("clientId"), disabled: false}, | |
| {key: "client_secret", value: pm.environment.get("clientSecret"), disabled: false}, |
A curated list of awesome Python frameworks, libraries, software and resources.
Inspired by awesome-php.
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| # This Makefile allows you to pass arguments to 'make', and have those get passed into commands for a target. | |
| # This also shows how to automatically generate a help menu using specially annotated comments on targets. | |
| # | |
| # Usage: | |
| # - make help | |
| # List of available targets: | |
| # | |
| # help List all available targets (default) | |
| # jenkins-cluster Run terraformctl on the aws-jenkins-cluster root module | |
| # cognito-userpool Run terraformctl for the cognito user pool |
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| ### Cloudwatch Events ### | |
| # Event rule: Runs at 8pm during working days | |
| resource "aws_cloudwatch_event_rule" "start_instances_event_rule" { | |
| name = "start_instances_event_rule" | |
| description = "Starts stopped EC2 instances" | |
| schedule_expression = "cron(0 8 ? * MON-FRI *)" | |
| depends_on = ["aws_lambda_function.ec2_start_scheduler_lambda"] | |
| } | |
| # Runs at 8am during working days |
What I use for Hortonworks HDP (Hadoop) systems, but should work for anyone.
Some configurations are tuned for Active Directory without relying on 'sssd-ad' such that the hosts don't need to join the domain.
sudo yum install sssd sssd-ldap sssd-krb5 sssd-tools authconfig \
oddjob oddjob-mkhomedir openldap-clients cyrus-sasl-gssapi \