Skip to content

Instantly share code, notes, and snippets.

View psahni's full-sized avatar
🏠
Working from home

Prashant psahni

🏠
Working from home
View GitHub Profile
@psahni
psahni / tools.md
Created February 24, 2026 07:45
AI tools
  • ShadCN
  • Tailwind CSS
  • Gemini
  • v0 (referred to as "Viro")
  • TanStack Query
  • TanStack Router
  • React Router
  • Framer Motion
  • Playwright
  • Temporal
@psahni
psahni / typescript.md
Last active January 16, 2026 07:16
Tip: TypeScript Utility Types

Tip: TypeScript Utility Types Suppose you have a javascript object but the object is dynamic, except few properties, you don't know what other properties are exactly

For example

let person = { id: 1, someAttribute: 'somevalue' } // In this object, only id is certain attribute.

@psahni
psahni / react_starting_point.md
Created December 26, 2025 04:58
react_starting_point
<html>
  <body>
    <div id="app"></div>
 
    <script src="https://unpkg.com/react@18/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
 
    <script type="text/jsx">
@psahni
psahni / linux.md
Created December 24, 2025 06:06
linux.md

Generate a secret key

openssl rand -base64 32

@psahni
psahni / Prompts.md
Created December 16, 2025 14:21
prompt

PROMPT STRUCTURE

Role:

You are an expert Nextjs (or Python, or Swift...) developer working on an existing e-commerce app.

Task:

Create an implementation plan for creating event-driven data integrations with their CRM platform on Filemaker.

Format:

1-paragraph Executive Summary

@psahni
psahni / social_media_post.md
Created November 12, 2025 08:12
social media post
@psahni
psahni / css learnings
Created April 4, 2025 04:41
css learnings
img {
display: block;
max-width: 100%
}
header {
min-height: 300px; // allowed to grow // 80vh
}
@psahni
psahni / ollama_test.py
Created March 31, 2025 13:25
ollama_test.py
from openai import OpenAI
client = OpenAI(
base_url = 'http://localhost:11434/v1',
api_key='ollama', # required, but unused
)
response = client.chat.completions.create(
model="llama2",
messages=[
@psahni
psahni / express_server.js
Created February 19, 2025 08:35
simple express server
const express = require('express');
const path = require('path');
const app = express();
// Serve static files from the root directory
app.use(express.static(__dirname));
// Serve the index.html file
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'));
@psahni
psahni / next.js
Created January 25, 2025 08:54
next.js
|── Getting Started
| ├── Installation
| ├── Project Structure
| └── Basic Routing
|
|── Routing
| ├── Client-Side Routing
| ├── Server-Side Routing
| ├── Dynamic Routing
| ├── Internationalized Routing