Skip to content

Instantly share code, notes, and snippets.

View ra-kesh's full-sized avatar

Rakesh ra-kesh

View GitHub Profile
@ra-kesh
ra-kesh / Fouture_500_globally_India_office.csv
Created October 11, 2024 20:01 — forked from mrtushartiwari/Fouture_500_globally_India_office.csv
This CSV file contains a meticulously curated list of Fortune 500 companies that have established operations in India. Each entry includes detailed information such as: Company Name: The official name of the Fortune 500 company. Industry: The primary industry sector the company operates in (e.g., Technology, Finance, Healthcare). Indian Office L…
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 16 columns, instead of 5 in line 4.
,Rank,Company,Industry,Address,City,State / Country,Postal Code,Country,"Revenue (in millions, USD)",Employees,Ticker,Website,CEO,Indian_cities,Department_in_india
0,1,Walmart,General Merchandisers,702 S.W. Eighth St.,Bentonville,Arkansas,72716,U.S.,"$572,754",2300000.0,WMT,www.walmart.com,C. Douglas Mcmillon,"['Bangalore', 'Gurugram', 'Hyderabad', 'Mumbai', 'New Delhi', 'Pune']","['E-commerce', 'Technology', 'Data Analytics', 'Finance', 'Human Resources', 'Supply Chain', 'Marketing', 'Customer Service', 'Operations', 'Legal']"
1,2,Amazon.com,Internet Services and Retailing,410 Terry Ave. N.,Seattle,Washington,98109,U.S.,"$469,822",1608000.0,AMZN,www.amazon.com,Andrew R. Jassy,"['Bangalore', 'Hyderabad', 'Chennai', 'Gurgaon']","['Technology', 'Operations', 'Customer Service', 'Business Development', 'Finance', 'Human Resources', 'Marketing']"
2,3,State Grid,Utilities,86 Xichang'an Ave.,Beijing,China,100031,China,"$460,617",871145.0,,www.sgcc.com.cn,,[],[]
3,4,China National Petroleum,Petroleum Refining,9 Dong
@ra-kesh
ra-kesh / react-performance.md
Created September 4, 2023 04:58 — forked from mathesond2/react-performance.md
Notes From Steve Kinney's "React Performance" Frontend Masters Course

React Performance

Notes From Steve Kinney's "React Performance" Frontend Masters Course

General

re: optimizations: "Start with a problem first, then solve it. dont go looking for problems."

"measure first before you optimize for performance. And then measure again."

import type { ComponentType } from "react"
import styled from "@emotion/styled"
const GradientBlur = styled.div`
user-select: none;
pointer-events: none;
position: fixed;
top: 0px;
left: 0px;
function walkDOMTree(
root,
whatToShow = NodeFilter.SHOW_ALL,
{ inspect, collect, callback } = {}
) {
const walker = document.createTreeWalker(root, whatToShow, {
acceptNode(node) {
if (inspect && !inspect(node)) {
return NodeFilter.FILTER_REJECT;
}
@ra-kesh
ra-kesh / backendgist.md
Last active December 12, 2022 08:02
Backend Must To know things
  • Relational Databases
    • Creating, Altering, Dropping Tables
      • Primary and Secondary Keys
      • Adding Relationships Between Two Tables using Foreign Key
      • UNIQUE, DEFAULT, NOT NULL constraints
    • Inserting, Updating, Deleting Rows in a Table
    • Fetching data with SELECT queries
      • Filtering and Sorting
      • Aggregations
  • Optimizations using *
@ra-kesh
ra-kesh / useCarousel.ts
Created June 10, 2022 11:34 — forked from FlorianRappl/useCarousel.ts
The generic useCarousel hook.
import { useReducer, useEffect } from 'react';
import { useSwipeable, SwipeableHandlers, EventData } from 'react-swipeable';
function previous(length: number, current: number) {
return (current - 1 + length) % length;
}
function next(length: number, current: number) {
return (current + 1) % length;
}
@ra-kesh
ra-kesh / getDates.js
Created March 27, 2022 09:20 — forked from miguelmota/getDates.js
Get dates in between two dates with JavaScript.
// Returns an array of dates between the two dates
function getDates (startDate, endDate) {
const dates = []
let currentDate = startDate
const addDays = function (days) {
const date = new Date(this.valueOf())
date.setDate(date.getDate() + days)
return date
}
while (currentDate <= endDate) {
@ra-kesh
ra-kesh / what-forces-layout.md
Created March 10, 2022 06:48 — forked from paulirish/what-forces-layout.md
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
@ra-kesh
ra-kesh / composing-software.md
Created November 12, 2021 04:44 — forked from Geoff-Ford/composing-software.md
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@ra-kesh
ra-kesh / master-javascript-interview.md
Created November 12, 2021 04:40 — forked from Geoff-Ford/master-javascript-interview.md
Eric Elliott's Master the JavaScript Interview Series