Skip to content

Instantly share code, notes, and snippets.

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

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active January 15, 2025 11:36
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@xinha-sh
xinha-sh / client.ts
Last active January 15, 2025 11:35
Expo auth implementation using SST Auth V2
import type { StandardSchemaV1 } from "@standard-schema/spec";
import { type JSONWebKeySet, createLocalJWKSet, errors, jwtVerify } from "jose";
import {
InvalidAuthorizationCodeError,
InvalidRefreshTokenError,
InvalidSessionError,
} from "./error";
import { generatePKCE } from "./pkce";
import type { SubjectSchema } from "./session";
@SoaringGecko
SoaringGecko / README.md
Last active January 15, 2025 11:31
increase video volume past the normal maximum

based off of the following code https://stackoverflow.com/a/43794379/11006719 this edited version fixes the issue that would only let you use increase the volume on one video element every time the url is changed (The Firefox versions run when you click the page do to Firefox requiring the user to interact with the page before it allows you to create an AudioContext).

The versions with safety in the name (and the userscripts) will prompt you to confirm your input when you set it so high.

Chromium Bookmarklet (safety on)

Chromium Bookmarklet

Firefox Bookmarklet (safety on)

Conf File
Conf file or configuration file is the most important file in Odoo. It is used to set the initial parameters to run the Odoo.
Parameters:-
addons_path: defines the addons path folders, which are added in priority order.
admin_passwd: Names the Master password, which can also be changed from the front end. The master password for Odoo will be hashed and saved in the conf file when it is set or modified.
csv_internal_sep: Specifies the separator to use in the CSV file.
data_dir: specifies the path to the directory containing the filestore for data linked to Odoo.
db_host: Specifies the database host. Localhost is set by default.
db_maxconn: specifies the maximum number of PostgreSQL physical connections.

I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:

Do consider to STAR, if it helped you.

London

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 15, 2025 11:27
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@nufeng1999
nufeng1999 / InstallWSA.md
Last active January 15, 2025 11:26
[安装 Windows Subsystem for Android™️ ] 安装 Windows Subsystem for Android™️

1.获得 WAS 微软商店链接地址

https://www.microsoft.com/store/productId/9P3395VX91NR

2.下载 WAS 安装包

安装包抓包网址
https://store.rg-adguard.net/ 在这里输入上述商店链接,右边要选择Slow通道
(共有四个选项,分别是Fast,Slow,RP和Retail,分别对应Windows的Dev渠道,Beta渠道,RP渠道和正式版,目前只有Beta版本有发布)
找到最下面名为
"MicrosoftCorporationII.WindowsSubsystemForAndroid_*.msixbundle"
的包进行下载,即可获取最新的Beta版本的抓包

@kishikawakatsumi
kishikawakatsumi / gist:079f800561869c386e7702048b7580e1
Last active January 15, 2025 11:22
applelocalization.com に対するデータ追加更新の手順
** 概要
applelocalization-toolsでシステムの言語ファイルを読み取り、applelocalization-dataのデータを作る。
追加したデータを表示できるようにWebフロントエンド(エンドポイントやドロップダウンメニューを追加する)を修正する。
*** 手順 1〜11
- github.com/kishikawakatsumi/applelocalization-tools
- システムに含まれる言語ファイルを読み取りDBの1レコード単位に整形したJSONファイルを作る
- JSONファイルからDBにインポートできるデータを作る。
@Graunephar
Graunephar / Getting started hello world examples for ESP32-C6 in PlatformIO both in ESP-IDF and Arduino.md
Last active January 15, 2025 11:19
Getting started hello world examples for ESP32-C6 in PlatformIO both in ESP-IDF and Arduino

Congratulations starting out on Your ESP32-C6!

When I started working with the ESP32-C6, I quickly realized how confusing it could be to find simple, working examples for getting started in PlatformIO. I needed basic, functional repositories to understand the differences between using Arduino and ESP-IDF, and how to work with features like the Ultra-Low Power (ULP) core. After spending countless hours piecing together information from various sources, I decided to create my own set of examples.

This gist will not go into details on why to choose one approach over the other. That can be found elsewhere. But for those who wants to use PlatformIO its a good starting point for working code.

This gist provides an overview of five working repositories I’ve built, each focused on a simple blink program. These examples are designed to be easy to understand and get you started without unnecessary complexity. Each repo is ready to clone and run in PlatformIO, covering the different ways to program the ESP32-C6