Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.
For anyone considering the use of ULIDs in MySQL with drizzle, here's a ready-to-use ULID type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files| import { Client, ServiceError, Metadata, CallOptions, ClientUnaryCall } from '@grpc/grpc-js'; | |
| import { Message } from 'google-protobuf'; | |
| type OriginalCall<T, U> = (request: T, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError, res: U) => void) => ClientUnaryCall; | |
| type PromisifiedCall<T, U> = ((request: T, metadata?: Metadata, options?: Partial<CallOptions>) => Promise<U>); | |
| export type Promisified<C> = { $: C; } & { | |
| [prop in Exclude<keyof C, keyof Client>]: (C[prop] extends OriginalCall<infer T, infer U> ? PromisifiedCall<T, U> : never); | |
| } |
| # Source: https://gist.github.com/07b0b4642b5694d0239ee7c1629173ce | |
| ####################################################### | |
| # Kustomize # | |
| # How to simplify Kubernetes configuration management # | |
| # https://youtu.be/Twtbg6LFnAg # | |
| ####################################################### | |
| ######### | |
| # Setup # |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
| // Because we're using an ORM (Objection), it's a pain to add a tsvector when inserting, | |
| // since tsvectors and FTS aren't supported by Objection. Instead, I've added a hook that | |
| // fires on insert which auto-generates the tsvector field for each newly inserted entry. | |
| // This is an example knex migration file for said behavior. | |
| const addUserIndex = ` | |
| ALTER TABLE public.user ADD "document" tsvector; | |
| CREATE FUNCTION my_trigger_function() | |
| RETURNS trigger AS $$ |
| /* | |
| List all of your running (or pending) EC2 instances with Amazon golang sdk. | |
| For a list of filters or instance attributes consult the [official documentation](http://godoc.org/github.com/awslabs/aws-sdk-go/gen/ec2#Instance). | |
| */ | |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/awslabs/aws-sdk-go/aws" |
I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/
It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.
Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.
To learn more about migrations, check out this article on the different types of database migrations!