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 / 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
@psahni
psahni / common_linux_commands
Created November 12, 2024 11:20
common_linux_commands
Linux commands - commonly used
๐—•๐—ฎ๐˜€๐—ถ๐—ฐ๐˜€:
`man` - Skim through manual for better understanding.
`nano` / `vim` - Use nano for basic editing, vim for advanced editing.
`ls -l` - List files with detailed info.
`ssh` - Connect to remote machines securely.
`df` / `du -hs *` - Check disk space usage.
`chown` / `chmod` - Change ownership and permissions of files.
`dig` - DNS lookup to find IPs of hostnames.
๐—˜๐˜ƒ๐—ฒ๐—ฟ๐˜†๐—ฑ๐—ฎ๐˜† ๐—จ๐˜€๐—ฒ:
@psahni
psahni / http_codes.md
Last active October 13, 2024 04:36
http codes

200 Success - Request completed.

201 Success - New resource created.

202 Success - The request has been accepted, but not yet processed.

204 Success - No content to return.

400 Bad Request - The request could not be parsed, generally due to bad syntax.