Skip to content

Instantly share code, notes, and snippets.

View Aestheticsuraj234's full-sized avatar
🤖
Burning Tokens💸

Suraj Kumar Jha Aestheticsuraj234

🤖
Burning Tokens💸
View GitHub Profile

30+ Advanced JavaScript Features Every Developer Should Know


1. Generator Functions

Reference: A function that pauses execution with yield and resumes later using next().

function* counter() {
useEffect(() => {
const controller = new AbortController();
async function loadPost() {
try {
setStatus("loading");
const response = await fetch(
"https://jsonplaceholder.typicode.com/posts?_limit=5",
{ signal: controller.signal }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Mini Kanban Board</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Kanban Board</h1>
body{
margin:0;
height:100vh;
display:flex;
justify-content:center;
align-items:center;
background:#121212;
font-family:Arial, Helvetica, sans-serif;
color:white;
}
import { NextResponse } from "next/server";
import axios from "axios";
export async function GET() {
try {
// Ask OpenAI for a temporary client_secret
const response = await axios.post(
"https://api.openai.com/v1/realtime/client_secrets",
{
model: "gpt-4o-realtime-preview-2025-06-03",
"use client";
import { useState } from "react";
import { RealtimeSession } from "@openai/realtime"; // install if not already
export default function Home() {
const [session, setSession] = useState<any>(null);
async function handleStartAgent() {
console.log("Requesting temp API key from /api/session...");
import { StateGraph, Annotation } from "@langchain/langgraph";
import { ChatOpenAI } from "@langchain/openai";
import { z } from "zod";
const llm = new ChatOpenAI({
model: "gpt-4o-mini" // Fixed model name
});
// Define the state schema
const StateSchema = z.object({

💡 1. College Bus Tracker

Track live location of college buses and show estimated arrival time for each stop. ✅ Uses: Maps API, Real-time DB (Firebase), Notifications


💡 2. Roommate Expense Splitter

  1. Admin Login Details email:codesnippet003@gmail.com password:@1234567890Ss

  2. Problem Creation Details

{
    "title": "Addition of Two Numbers",
    "description": "Write a program that takes two integers as input and returns their sum.",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kaya Loader</title>
<style>
body {
background: #fff;
display: flex;
justify-content: center;