Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

164 total results found

Notes

GCP Professional Cloud Developer Prepar...

IaaS and PaaS IaaS delivers on-demand infrastructure resources vis the cloud, it provide raw compute, storage, and network capabilities, organized virtually into resources that are similar to physical data centers. Compute Engine is an example of a Googl...

Terraform Notes

GCP

Template for Terraform GCP config file? terraform { required_providers { google = { source = "hashicorp/google" version = "4.51.0" } } } provide "google" { project = "logan-dev1" } resource ... How to declare a vari...

Q&A

GCP

What does SQL Proxy provide? a secure way to access Cloud SQL instances without having to allowlist IP addresses or configure SSL.Secure connections (automatic traffic encryption and SSL certification encryption) and easier connection management (automatic au...

gcloud notes

GCP

Universals # the cheat sheet $ gcloud cheat-sheet # initialize gcloud $ gcloud init # get gcloud version $ gcloud version # gcloud components $ gcloud components install $ gcloud components update # gcloud info $ gcloud info # gcloud help...

Markdown CheatSheet

Cheat Sheets

Basic Syntax These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements. Refenced from here: click Syntax Description Heading # H1 ##H2 ### H3 Bold **bold text** Italic *italicized ...

OpenAPI V3.0 Syntax CheatSheet

Cheat Sheets

OpenApi 3.0 specification in Yaml format contents can be written in separate files, and referenced with $ref: "./schemas/User.yaml" syntax Example: # Version of the openapi specificaiton openapi: 3.0.0 # General metadata about this app info: version: 1.0.0...

GORM CheatSheet

Cheat Sheets Database

Import import ( "gorm.io/driver/mysql" "gorm.io/driver/postgres" "gorm.io/gorm" ) func main() { // MYSQL: // refer https://github.com/go-sql-driver/mysql#dsn-data-source-name for details dsn := "user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4...

Golang CheatSheet

Cheat Sheets

Zero Values integer: 0 float: 0.0 boolean: false strings: "" channel, map, slice, pointer, function, interface: nil // MD5 hashing example: import ( "crypto/md5" "encoding/hex" ) func GetMD5Hash(text string) string { hasher := md5.New() ...

Proto3 CheatSheet

Cheat Sheets

Why Protocol Buffers? Protocol buffers are Google's language-independent, platform-independent, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then y...

PostgreSQL CheatSheet

Cheat Sheets Database

PostgreSQL is: open sourced supports both relational and non-relational (JSON) queries for dynamic websites and web applications Why are there schemas in each database? To better organize tables, create modules, and use RBAC Public is the default schema Som...

Inheritance Pattern

MongoDB Basic Schema Design Patterns

To apply the Inheritance Pattern to documents in a collection, you can use the aggregation framework. This first example updates all book documents with a new “product type” field to identify the shape of the ebook, printed book, and audiobook documents. The p...

Finance

Cheat Sheets Finances

ISO 20022 a international standard for communication in financial systems. widely adopted by financial institutes world wide clear standardized format, efficient, real-time processing (RTP), flexible, example: <Document> <CstmrCdtTrf> <GrpHdr> <M...

Don't Communicate by Sharing Memory, Share Memory by Communicating

Golang Advanced Golang

Mutex

Cheat Sheets Fundamentals

What is it mutual exclusion a synchronization primitive used in concurrent programming to ensure that only one thread can access a shared resource at a time How it works Locking: a thread that needs to access a sahred resource acquires the mutex lock if th...

Goroutine

Golang Advanced Golang

Goroutines are not threads The Go runtime efficiently manages a pool of OS threads to execute many goroutines. It intelligently schedules goroutines onto these threads, switching between them as needed. This multiplexing allows for highly concurrent applicat...

Concurrency vs Parallelism

Golang Advanced Golang

Computed Pattern

MongoDB Basic Schema Design Patterns

Use Case: running a function frequently degrade performance, for example: calculate the average rating whenever a new review is submitted. Mathematical Operation: store avg and # of reviews. then update the rating: (avg_rating * #reviews + new_rating) / (#r...

Approximation Pattern

MongoDB Basic Schema Design Patterns

When data is changing constantly, and exact statistic is not critical, we can use approximations with a decent level of accuracy.

Extended Reference Pattern

MongoDB Basic Schema Design Patterns

Joins are expensive so store some must have data into the child to avoid joins. This creates data duplicate, yes, but it's an expense we can pay in exchange for performance. Duplicated data should not change frequently in nature. If data needs to be updated, ...

Schema Versioning Pattern

MongoDB Basic Schema Design Patterns

add a schema_version field to the document To Handle multiple versions: application handles both old and new version run a background task to update all documents to new version once migrated to new verion, remove code that handles old version