Element -- selects all h2 elements on the page
h2 {
foo: bar;| # https://docs.databricks.com/en/dev-tools/auth/oauth-u2m.html#generate-oauth-pair | |
| # the auth is handled via azure cli | |
| # you need to issue `az login` and set the sub name|id where the ws is attached. | |
| import cmd | |
| import uuid, hashlib, base64 | |
| def generate_codes(): | |
| # Generate a UUID. |
| # Windows Performance Counters plugin. | |
| # These are the recommended method of monitoring system metrics on windows, | |
| # as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI, | |
| # which utilize more system resources. | |
| # | |
| # See more configuration examples at: | |
| # https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters | |
| # If metrics are missing run `lodctr /r` as Administrator | |
| [[inputs.win_perf_counters]] |
| # -*- coding: utf-8 -*- | |
| """ | |
| pg_uuid | |
| ~~~~~~~~~~~~~~~~ | |
| <NO DESCRIPTION>. | |
| :copyright: (c) 2018 by WRDLL <[email protected]> | |
| """ | |
| from flask import Flask |
| # create password - note the md5 is the prefix and the value is user + password | |
| $ U=testpg; P=testpg; echo -n md5; echo -n $P$U | md5sum | cut -d' ' -f1 | |
| $ md54bb01023735acf990f528fe961df8140 | |
| # connect to pg | |
| $ psql | |
| postgres=# CREATE ROLE testpg NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT LOGIN PASSWORD 'md54bb01023735acf990f528fe961df8140'; | |
| postgres=# CREATE DATABASE testpgdb OWNER testpg; | |
| ^D | |
| # at this point you can connect to the database `testpgdb` such so | |
| $ psql -U testpg -d testpgdb -h YOURHOST -W |
| # Regular Colors | |
| | Value | Color | | |
| | -------- | ------ | | |
| | \e[0;30m | Black | | |
| | \e[0;31m | Red | | |
| | \e[0;32m | Green | | |
| | \e[0;33m | Yellow | | |
| | \e[0;34m | Blue | | |
| | \e[0;35m | Purple | |
| // class | |
| class ClassCar { | |
| drive () { | |
| console.log('Vroom!'); | |
| } | |
| } | |
| const car1 = new ClassCar(); | |
| console.log(car1.drive()); |
| #!/usr/bin/env bash | |
| # https://betterdev.blog/minimal-safe-bash-script-template/ | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { |
| apiVersion: v1 | |
| clusters: | |
| - cluster: | |
| insecure-skip-tls-verify: true | |
| server: https://SERVER:PORT | |
| name: main | |
| contexts: | |
| - context: | |
| cluster: main | |
| user: main |
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.