Skip to content

Instantly share code, notes, and snippets.

View YourAKShaw's full-sized avatar
:electron:
tapping away on my keyboard _</>...

Ayush Kumar Shaw YourAKShaw

:electron:
tapping away on my keyboard _</>...
View GitHub Profile

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active May 16, 2025 16:35
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@nicolasdao
nicolasdao / open_source_licenses.md
Last active April 29, 2025 00:59
What you need to know to choose an open source license.
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active May 1, 2025 14:39
Partition, format, and mount a drive on Ubuntu
@Alchemik
Alchemik / Java Interview.MD
Last active May 27, 2024 18:40
Java Interview

Multithreading, Concurrency and Thread basics Questions

  1. Can we make array volatile in Java? This is one of the tricky Java multi-threading questions you will see in senior Java developer Interview. Yes, you can make an array volatile in Java but only the reference which is pointing to an array, not the whole array. What I mean, if one thread changes the reference variable to points to another array, that will provide a volatile guarantee, but if multiple threads are changing individual array elements they won't be having happens before guarantee provided by the volatile modifier.

  2. Can volatile make a non-atomic operation to atomic? This another good question I love to ask on volatile, mostly as a follow-up of the previous question. This question is also not easy to answer because volatile is not about atomicity, but there are cases where you can use a volatile variable to make the operation atomic.

One example I have seen is having a long field in your class. If you know that a long field is accessed

@vasanthk
vasanthk / System Design.md
Last active May 16, 2025 07:32
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?