Skip to content

Instantly share code, notes, and snippets.

View somangshu's full-sized avatar
💭
Dreaming...Lucidly

Somangshu Goswami somangshu

💭
Dreaming...Lucidly
View GitHub Profile
@mohanarpit
mohanarpit / update-github-prs.sh
Created October 12, 2021 15:19
This script merges the default branch into any PR branch
#!/bin/bash
$default_branch="release"
git checkout $default_branch;
git pull;
while IFS= read -r prs || [ -n "$prs" ]; do
echo "Checking out PR: $prs"
gh pr checkout $prs;
git merge $default_branch --no-edit;
@somangshu
somangshu / country.json
Last active November 12, 2020 06:23
All Countries with ISO codes, Currency/Names and their native symbols
[
{
"code": "AD",
"currency": "EUR",
"currency_name": "Euro",
"label": "Andorra",
"phone": "376",
"symbol_native": "€"
},
{
@JoaquimLey
JoaquimLey / create_new_ssh_key.md
Last active April 4, 2024 11:07
Generating a new SSH key and adding it to the ssh-agent

Generating a new ssh-key

Open Terminal. Paste the text below, substituting in your GitHub email address.

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

This creates a new ssh key, using the provided email as a label

Generating public/private rsa key pair.

@paulirish
paulirish / what-forces-layout.md
Last active July 20, 2024 17:43
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent