I hereby claim:
- I am dmend on github.
- I am redrobot (https://keybase.io/redrobot) on keybase.
- I have a public key whose fingerprint is 4782 4516 424D 898B 54D6 48CC F229 4C99 E916 A3FB
To claim this, I am signing this object:
| [[local|localrc]] | |
| disable_all_services | |
| enable_service rabbit mysql key tempest | |
| enable_plugin barbican https://opendev.org/openstack/barbican | |
| # Modify passwords as needed | |
| DATABASE_PASSWORD=secretdatabase | |
| RABBIT_PASSWORD=secretrabbit | |
| ADMIN_PASSWORD=secretadmin |
| #!/bin/bash | |
| sudo dnf install -y git tmux vim | |
| git clone https://github.com/dmendiza/dotfiles.git $HOME/.dotfiles | |
| cfgfiles=( | |
| .gitconfig | |
| .tmux.conf | |
| .vimrc | |
| ) |
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCp3ej0bhOkhSV6JOAcMsmsGzV4xXYismUILvmn6zcCvveC9OvoRsh59CqIk047oxB9+CmEGqnGckOZYmtjcCAtKZttA8KaOV9rQyDNZxGSqPbpSdnVj9RJrywNPvo4zOaTNR1/kPAuNU2PFzaX/CiijtKw4oD1Mh7c0j8AuUBlkBnaTcLcTjciDxzPy7vpYB/wWt9OS+L0qBiYhYBDy2juxfu9QAXF431Tv1qf+o21csG8vCJvxN9ji5vTc7dGrkpTw2EXma5CFgqdm4B/E/TwHSsLChuSnp/TWlFVcdzyD3PK2upCJZeXs4JRxVXM8XxBS2/9HsHFlCtwxFVXNgHhFVCT+0+ZQJC6BDnWArHY7efxkJxVqYECEGZCCA3XlfqfzSTSmPEAPdQBsN3WvsJHdsf3ROkyStsANKcAGrxBANncSFskJylXP4mnydJoKURh/ykn+YnyKjt1u9O+DR9UN849xvs5UxQRQhbMOZ6wVZLvMwdJml/HFPo3rbr5C4gmLLcVeQh7DEzlnFDhmUrwbPDs5+JvDeXLFGfjhlX/2IU728C2jPdvseyfnv0qH/EiGsZ8ffh/5D+FP6QjWgoGs4PoXiyQAs4/Xgd9agJ++JthUs6LB637fR4pWJCLywqQzu0guDN1ooplZ3ZE1j1eEZtu9LlyYIEPjU0Zar6Tfw== [email protected] |
I hereby claim:
To claim this, I am signing this object:
| @app.route('/signup', methods=['GET', 'POST']) | |
| def signup(): | |
| error = None | |
| if request.method == 'POST': | |
| email = request.form['email'] | |
| password = request.form['password'] | |
| if not (email or password): | |
| return signup_error('Email Address and Password are required.') | |
| db = get_db() | |
| c = db.cursor() |
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| startDate := time.Date(2017, 06, 21, 10, 19, 00, 0, time.UTC) |
| def apply_port_exclusions(include_ports, exclude_ports): | |
| inc_ports = _reduced(include_ports) | |
| ex_low, ex_high = exclude_ports | |
| result = list() | |
| for pair in inc_ports: | |
| low, high = pair | |
| pair_range = range(low, high + 1) | |
| if high < ex_low or ex_high < low: | |
| # this pair is not excluded | |
| result.append(pair) |
| from barbicanclient import client | |
| import base64 | |
| from keystoneauth1.identity import v2 | |
| from keystoneauth1 import session | |
| import os | |
| _AES_256_SIZE = 32 # bytes | |
| AES_256_KEY = os.urandom(_AES_256_SIZE) | |
| auth = v2.Password(username=os.environ['OS_USERNAME'], |
| # import hmac library | |
| import hmac | |
| # configure a key | |
| HMAC_KEY = 'O\x8cNd\x16E\xb1U\x1b\x0b\xe8\t\xd8\xab\xbcI' | |
| # change signing function to use hmac | |
| ctx = hmac.new(KEY, digestmod=hashlib.sha256) | |
| ctx.update(request.args["data"]) | |
| digest = ctx.hexdigest() |
| # Generate a new fernet key and save it to a file named encryption_key.txt | |
| >>> from cryptography.fernet import Fernet | |
| >>> Fernet.generate_key() | |
| # Load key from file in app.py | |
| with open(encryption_key.txt) as f: | |
| FERNET_KEY = f.read() | |
| # In the upload function, we want to encrypt the file | |
| @app.route("/upload", methods=["POST"]) |