Setup One: Buy a Mac if you don't have one.
Setup Two: Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Setup Three:
| location ^~ /api/files/ { | |
| proxy_pass http://127.0.0.1:8080; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| } |
| https://claude.ai/share/174ead5b-74bf-4df3-9cc8-e497c0cf456f | |
| https://claude.ai/share/80b69f30-4414-4d42-b7a7-073113cd9079 | |
| https://chatgpt.com/share/69156ae1-0220-8005-8b00-ca11b31c15a5 |
| services: | |
| mariadb: | |
| image: mariadb:11.4.7 | |
| container_name: mariadb | |
| restart: unless-stopped | |
| environment: | |
| MARIADB_ROOT_PASSWORD: rootpass123 | |
| MARIADB_DATABASE: appdb | |
| MARIADB_USER: appuser | |
| MARIADB_PASSWORD: apppass123 |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| container_name: redis | |
| restart: unless-stopped | |
| command: > | |
| redis-server | |
| --appendonly yes | |
| --save "900 1" --save "300 10" --save "60 10000" | |
| --maxmemory-policy allkeys-lru |
Setup One: Buy a Mac if you don't have one.
Setup Two: Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Setup Three:
| #!/usr/bin/env bash | |
| # Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime which can be found at: | |
| # https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html | |
| # | |
| # As of May 21, 2019, this is: | |
| # Amazon Linux AMI 2018.03.0 (ami-0756fbca465a59a30) | |
| # | |
| # You need to prepend PATH with the folder containing these binaries in your Lambda function | |
| # to ensure these newer binaries are used. |
| const crypto = require('crypto'); | |
| const algorithm = 'aes-256-ctr'; | |
| let key = 'MySuperSecretKey'; | |
| key = crypto.createHash('sha256').update(String(key)).digest('base64').substr(0, 32); | |
| const encrypt = (buffer) => { | |
| // Create an initialization vector | |
| const iv = crypto.randomBytes(16); | |
| // Create a new cipher using the algorithm, key, and iv | |
| const cipher = crypto.createCipheriv(algorithm, key, iv); |
| /* | |
| * AWS Sdk KMS spike: (assuming node v6.6+) | |
| * 1 - Create master key at KMS | |
| * 2 - Copy alias or ARN | |
| * 3 - run this i.e. | |
| * $ node spike.js KEY_ALIAS YOUR_PLAINTEXT_TO_ENCRYPT | |
| */ | |
| const AWS = require('aws-sdk'); | |
| // aws-sdk is not reading my region info so i'll have to set it here |
| var crypto = require('crypto') | |
| , fs = require('fs') | |
| // Algorithm depends on availability of OpenSSL on platform | |
| // Another algorithms: 'sha1', 'md5', 'sha256', 'sha512' ... | |
| var algorithm = 'sha1' | |
| , shasum = crypto.createHash(algorithm) | |
| // Updating shasum with file content | |
| var filename = __dirname + "/anything.txt" |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>HMAC-SHA256 Example</title> | |
| </head> | |
| <body> | |
| <script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script> | |
| <script> | |
| var sharedSecret, query, signature, hmac, xhr; |