Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1707350400" LAST_MODIFIED="1707350400" PERSONAL_TOOLBAR_FOLDER="true">Tech Resources</H3>
<DL><p>
@sujeet-agrahari
sujeet-agrahari / grokking_to_leetcode.md
Created January 7, 2025 07:38 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@sujeet-agrahari
sujeet-agrahari / admin.sql
Created July 6, 2023 18:21 — forked from namrata4/admin.sql
Handy PostgreSQL Monitoring Scripts
-- turn off paging (less/more)
psql> \pset pager off
/*
Pager usage is off.
*/
-- find an object name by id
SELECT OID, relname
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
@sujeet-agrahari
sujeet-agrahari / psql_useful_stat_queries.sql
Created June 28, 2023 17:54 — forked from anvk/psql_useful_stat_queries.sql
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
echo-server-epoll
echo-server-poll
talk
talk.dSYM
reosurces: https://www.jsv9000.app/
http://latentflip.com/loupe/
Work as a browser engineer who is expert in creating web browsers. Who is also expert in javascript. Validate and correct below statement and also answer the question:
There are three main components on browser side javascript runtime i.e. v8, web apis, and a event loop that watches on the callback queues and executes it.
question1 : How many type of callback queues are there in this case? What are their priority and what type of tasks they hold?
question2: If there is an express ` a = a +1` does it go to event loop or executed on v8 right away?
ChatGPT
The statement you provided is mostly accurate. However, it's important to clarify a few points.
@sujeet-agrahari
sujeet-agrahari / query.mongodb
Last active December 3, 2022 18:01
mongodb-aggregation
// MongoDB Playground
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
const database = 'ecommerce';
// The current database to use.
use(database);
// Create a new collection.
// db.createCollection(collection);
@sujeet-agrahari
sujeet-agrahari / elastic search query
Last active November 13, 2022 07:52
Elastic Search Queries
GET players/_search
{
"track_total_hits": true
}
GET players/_search
{
"query": {
"range": {
"@timestamp": {