Skip to content

Instantly share code, notes, and snippets.

View hasan-py's full-sized avatar

Hasan hasan-py

View GitHub Profile
@hasan-py
hasan-py / singlyLinkedList.ts
Created January 28, 2022 05:19
Singly Linked List Implementation With Typescript 🔥🔥
class SinglyLinkedListNode {
value: any;
next: any;
constructor(value: any) {
this.value = value;
this.next = null;
}
}
@hasan-py
hasan-py / graph.js
Last active March 4, 2022 05:08
Simple Graph Implementation (Vertex, Edge)
class Graph {
constructor() {
this.adjecencyList = {};
}
addVertex(vertex) {
if (!this.adjecencyList[vertex]) this.adjecencyList[vertex] = [];
}
addEdge(vertex1, vertex2) {
@hasan-py
hasan-py / UUId.js
Created May 5, 2022 14:10
Generate uuId
const UUId = () =>
([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
(
c ^
(crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))
).toString(16),
);
@hasan-py
hasan-py / index.js
Created June 4, 2022 16:02
Live Coding Questions (Airwrk) | Mahmudul Hasan Emon
/* Problem 03 */
const remove_duplicate = (N, arr) => {
let tempArr = [];
for (let i = 0; i < N; i++) {
if (arr[i] !== arr[i + 1]) {
tempArr.push(arr[i]);
}
}
@hasan-py
hasan-py / gist:d24e7457dce57dcba2b3a93deba7c196
Last active July 12, 2023 07:41
Custom Scrollbar React Native
========================= Custom scrollbar =========================
import { useEffect, useRef, useState } from "react";
import { ActivityIndicator, Text, View } from "react-native";
import { useSelector } from "react-redux";
import { getAudiosBySurah } from "../../../store/slices/quranSlices/ayatAudioSlice";
import {
getAllSurahList,
syncCacheSurahListFromDb,
} from "../../../store/slices/quranSlices/surahListSlice";
@hasan-py
hasan-py / useLongPress.ts
Created January 24, 2024 16:30 — forked from KristofferEriksson/useLongPress.ts
A simple useLongPress hook for React
import { useCallback, useEffect, useRef } from "react";
export function useLongPress({
delay,
onLongPress,
onClick,
onCancel,
onFinish,
onStart,
}: {
@hasan-py
hasan-py / active.md
Created January 3, 2025 09:48 — forked from paulmillr/active.md
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers