Skip to content

Instantly share code, notes, and snippets.

View satyajitnayk's full-sized avatar
🏠
Working from home

satyajit satyajitnayk

🏠
Working from home
View GitHub Profile
@rushilgupta
rushilgupta / GoConcurrency.md
Last active May 14, 2024 06:30
Concurrency in golang and a mini Load-balancer

INTRO

Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".

Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).

Let's dig in:

Goroutines

@satyajitnayk
satyajitnayk / handlebar_ast_back_to_template.MD
Last active December 22, 2023 12:31
Converts Handlebars Abstract Syntax Tree (AST) back to template string

Handlebars AST to Template String using hbs-ast-to-str

This Gist introduces the hbs-ast-to-str package, which provides a solution for converting Handlebars Abstract Syntax Trees (AST) into template strings.

hbs-ast-to-str

Installation

You can install the package using npm or yarn:

@satyajitnayk
satyajitnayk / vm_vs_container.MD
Created December 22, 2023 12:18
Virtual Machines vs. Containers

Virtual Machines vs. Containers

Virtualization Level

Virtual Machines (VMs)

  • Utilize hardware virtualization.
  • Rely on a hypervisor to virtualize physical hardware resources (processors, RAM, storage, network cards).

Containers

  • Use operating system-level virtualization.
  • Built upon the host OS's kernel, allowing multiple containers to run on a single OS instance.
@satyajitnayk
satyajitnayk / docker_vs_virtualmachine.MD
Created December 22, 2023 12:27
Docker vs Virtual Machines (VMs)

Docker vs Virtual Machines (VMs)

Introduction

  • Overview of Docker and Virtual Machines (VMs).
  • Agenda: Definitions, how they function, and guidance on workload suitability.

Common Themes

  • Both Docker and VMs address the concept of virtualization.

Virtualization