Skip to content

Instantly share code, notes, and snippets.

View pr4th4meshh's full-sized avatar
🎯
Learning

Prathamesh Asolkar pr4th4meshh

🎯
Learning
View GitHub Profile
@pr4th4meshh
pr4th4meshh / README.txt
Last active July 16, 2025 19:22
WebSocket integration: client & server
server/wsServer.ts -> server side integration (npm i ws)
client/wsClient.ts -> client side integration (built in WebSockets)
WebSocket is bidirectional protocol that is used in the same scenario of client-server communication,
unlike HTTP which starts from ws:// or wss://. It is a *stateful* protocol, which means the connection
between client and server will stay alive until it gets terminated by either party (client or server).
// STEPS data
export const STEPS = [
{
number: "1",
title: "Connect",
description:
"Build bridges and discover\n opportunities to unite for a cause.",
align: "right",
},
{
@pr4th4meshh
pr4th4meshh / json_db.py
Last active June 7, 2025 06:44
Python FastApi auth setup
import json
import os
from pathlib import Path
from typing import List, Dict, Optional
import uuid
DB_PATH = Path("users.json")
class JSONDatabase:
def __init__(self):
@pr4th4meshh
pr4th4meshh / FramerMotionFeaturesScrollComponent.tsx
Created June 6, 2025 20:13
Framer motion component where image stays on the left and text content stays on the right, as we scroll down, the image fade in transitions into other and the text content on the right scrolls into view against the feature image on the right.
"use client"
import { useRef } from "react"
import { motion, useScroll, useTransform } from "framer-motion"
import Image from "next/image"
const features = [
{
title: "Menu management",
description:
"Easily create, update, and manage your restaurant or branch menus with full control over your menu. Keep your offerings up-to-date with zero hassle.",