20240716


MIME types

MDN | MIME types (IANA media types) - HTTP

A media type (also known as a Multipurpose Internet Mail Extensions or MIME type) indicates the nature and format of a document, file, or assortment of bytes.

Warning: Browsers use the MIME type, not the file extension, to determine how to process a URL, so it’s important that web servers send the correct MIME type in the response's Content-Type header. If this is not correctly configured, browsers are likely to misinterpret the contents of files, sites will not work correctly, and downloaded files may be mishandled.

This is the exact mistake I made today. CSS files are passed as text/html, failing to make browsers understand it.

Structure of a MIME type

A MIME type most commonly consists of just two parts: a type and a subtype, separated by a slash (/) — with no whitespace between:

type/subtype

Examples: text/plain, text/css, text/html, application/json

RFC 6838 - Media Type Specifications and Registration Procedures

Ingress

Ingress | Kubernetes

Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.

Ingress Controllers

Ingress Controllers | Kubernetes

In order for the Ingress resource to work, the cluster must have an ingress controller running.

Ingress Controllers seem to be softwares required to make Ingress work. There are various ingress controller implementation as the web page lists.

For example, when using AWS EKS, AWS Application Load Balancer (ALB) will be used.

An ingress controller as a reverse proxy

The official document says nothing about the similarity with a reverse proxy, but I believe they are the same at a high level;

An ingress controller routes traffic from the outside of the cluter to services within the cluster whereas a reverse proxy routes traffic to (internal) servers.

Issue/PR Templates in GitHub

About issue and pull request templates

With issue and pull request templates, you can customize and standardize the information you'd like contributors to include when they open issues and pull requests in your repository.

Configuring issue templates for your repository

To use an issue form in your repository, you must create a new file and add it to the .github/ISSUE_TEMPLATE folder in your repository.

I can have multiple templates (YAML) under the .github/ISSUE_TEMPLATE folder. For example, I can have different templates for a bug report and a feature request.

Creating a pull request template for your repository

When you add a pull request template to your repository, project contributors will automatically see the template’s contents in the pull request body.

It seems I need to create a template in .github/pull_request_template.md. If I want to have multiple templates, I can have .github/PULL_REQUEST_TEMPLATE/ folder same as the issue templates.


Ketone 60 mg/dl

Cheese 10g Snacks 10g

Total carbohydrate 20g


MUST:

TODO:


index 20240715 20240717