last update: Dec 4, 2020
- macOS >= 10.14 (Mojave); tested with 10.15 (Catalina)
- homebrew properly installed
| /** | |
| * WHY? - BECAUSE EXCEPTIONS/TRY/CATCH IS A GLOBAL HORRIBLE MESS :-( | |
| * Check out error handling in golang: https://blog.golang.org/error-handling-and-go | |
| */ | |
| /** | |
| * Wrap an "unsafe" promise | |
| */ | |
| function safePromise(promise) { | |
| return promise |
| // Taken from https://stackoverflow.com/questions/55539387/deep-omit-with-typescript | |
| /** Union of primitives to skip with deep omit utilities. */ | |
| type Primitive = string | Function | number | boolean | Symbol | undefined | null | |
| /** Deeply omit members of an array of interface or array of type. */ | |
| export type DeepOmitArray<T extends any[], K> = { | |
| [P in keyof T]: DeepOmit<T[P], K> | |
| } |
last update: Dec 4, 2020
| #!/usr/bin/env bash | |
| # License: MIT - https://opensource.org/licenses/MIT | |
| # | |
| # Usage: | |
| # | |
| # Encrypt a file: | |
| # kms-vault encrypt My-Key-Alias some-file-i-want-encrypted.txt > topsecret.asc | |
| # |
| //------------------------------------------------------------- | |
| // | |
| // Hypothesis: | |
| // | |
| // Promises/A is a Monad | |
| // | |
| // To be a Monad, it must provide at least: | |
| // - A unit (aka return or mreturn) operation that creates a corresponding | |
| // monadic value from a non-monadic value. | |
| // - A bind operation that applies a function to a monadic value |
| # ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use: | |
| # "${data.external.ssh_key_generator.result.public_key}" (contents) | |
| # "${data.external.ssh_key_generator.result.private_key}" (contents) | |
| # "${data.external.ssh_key_generator.result.private_key_file}" (path) | |
| data "external" "ssh_key_generator" { | |
| program = ["bash", "${path.root}/../ssh_key_generator.sh"] | |
| query = { | |
| customer_name = "${var.customer_name}" | |
| customer_group = "${var.customer_group}" |
WARNING: A work in progress, this is a first attempt at getting VideoJs working in a Typescript and React Enviroment.
This was inspired from the VideoJS React Tutorial - (see also Brightcover Player with React and Typescript)
Prerequistes Using TypeScript-React-Starter: https://github.com/Microsoft/TypeScript-React-Starter
Then npm install packages
Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
<fargate-profile-namespace>. Guidekube-system namespace, refer guide from previous step)Refer Helm Installation to install helm command
| // ~/server/api/sse.ts | |
| export default defineEventHandler(async (event) => { | |
| if (!process.dev) return { disabled: true } | |
| // Enable SSE endpoint | |
| setHeader(event, 'cache-control', 'no-cache') | |
| setHeader(event, 'connection', 'keep-alive') | |
| setHeader(event, 'content-type', 'text/event-stream') | |
| setResponseStatus(event, 200) |