Skip to content

Instantly share code, notes, and snippets.

View SK-CSE's full-sized avatar
๐Ÿ‡ฎ๐Ÿ‡ณ
job( write scalable code || Review PRs );

Saurabh Kumar SK-CSE

๐Ÿ‡ฎ๐Ÿ‡ณ
job( write scalable code || Review PRs );
View GitHub Profile

Rebasing a Feature Branch (feature-branch-name) onto a Release Branch (release-branch-name)

This document outlines the process of rebasing a feature branch (feature-branch-name) onto a release branch (release-branch-name) when the release branch has received new merges. This is a common scenario in collaborative development, and rebasing helps maintain a clean project history.

Why Rebase?

When you branch off of another branch (like release-branch-name), you create a separate line of development. As other pull requests (PRs) are merged into release-branch-name, the history of your feature-branch-name branch diverges. Rebasing helps in the following ways:

  • Diverged History: Your feature-branch-name branch's history becomes different from release-branch-name as others merge their work.
  • Cleaner History: Rebasing creates a linear project history, making it appear as if you started your work after the latest changes were merged into release-branch-name.
@SK-CSE
SK-CSE / twistedDeepclone.js
Created July 7, 2023 11:10
Deep Clone million of nested object without throwing call stack exceeded
function deepClone(obj) {
const stack = [{ source: obj, target: {} }];
const map = new WeakMap();
while (stack.length > 0) {
const { source, target } = stack.pop();
map.set(source, target);
for (let key in source) {
if (source.hasOwnProperty(key)) {
@SK-CSE
SK-CSE / thread2.js
Created September 26, 2020 09:43
worker thread demo
const { Worker, isMainThread, parentPort, workerData } = require('worker_threads');
if(isMainThread) {
console.log('main thread start...');
const worker = new Worker(__filename, {
workerData: {
prefix: 'Received message',
timeInSecond: 1000
}
@SK-CSE
SK-CSE / thread1.js
Last active September 14, 2020 09:24
const { Worker, isMainThread, parentPort } = require('worker_threads');
if(isMainThread) {
console.log('main thread start...');
const worker = new Worker(__filename);
worker.on('message', (msg) => {
console.log(`Worker: ${msg}`);
});
console.log("doing some random work in main thread..!!");
}else{
body {
background:#efefef;
}
form {
padding:30px;
border-radius:3px;
margin:50px auto;
width:150px;
background:#fff;
border-top:6px solid #ec1d3d;
@SK-CSE
SK-CSE / call-bind-apply.js
Created July 2, 2019 11:58
call bind apply example
// example 1
let name= {
f: "Saurabh",
l: "Kumar",
printName: function(){
console.log(this.f+ " "+this.l);
}
}

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@SK-CSE
SK-CSE / README.md
Created September 7, 2018 07:05 — forked from CodingDoug/README.md
Uploading images to Cloud Storage via the web and identifying them with Google Cloud Vision API

Uploading images to Cloud Storage via the web and identifying them with Google Cloud Vision API

If you're trying to do this, you came to the right place!

Watch this code work in real time: https://twitter.com/CodingDoug/status/945035556555186176

Setup

These instructions assume that you already have a Firebase project, and billing is enabled. Billing is required to use the Vision API.

@SK-CSE
SK-CSE / bulkUpdate.js
Created August 7, 2018 05:40 — forked from davideast/bulkUpdate.js
Bulk update with .push()
/**
* Send a bulk update to Firebase from an array or an object literal.
*
* When .push() is called on a Firebase reference without a parameter passed no
* trip to the server is made.
*
* ex:
* var childRef = ref.push();
*
* A reference is returned which has a push-id that can be returned by calling .name().
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software