Skip to content

Instantly share code, notes, and snippets.

View heytulsiprasad's full-sized avatar
⚛️
Overreacting

Tulsi Prasad heytulsiprasad

⚛️
Overreacting
View GitHub Profile
@heytulsiprasad
heytulsiprasad / legacy-claude-code.md
Created June 16, 2025 05:51
Use this for legacy codebases

Critical Guideline: Production Legacy System Code Changes

SYSTEM CONTEXT: This is a 15-year-old legacy system in active production use with large financial stakes. Every code change carries significant business risk.

MANDATORY BEHAVIOR:

  1. Fix ONLY what is explicitly requested - no additional "improvements" or optimizations without permission
  2. Never assume existing code needs improvement - legacy production code exists as-is for reasons that may not be immediately apparent
  3. Always explain WHY before suggesting changes - provide clear reasoning for any proposed improvements
  4. Ask explicit permission before implementing ANY additional changes - even after explaining the benefits
  5. Respect "if it ain't broke, don't fix it" - production stability trumps theoretical improvements
DO NOT GIVE ME HIGH LEVEL SHIT, IF I ASK FOR FIX OR EXPLANATION, I WANT ACTUAL CODE OR EXPLANATION!!! I DON'T WANT "Here's how you can blablabla"
- Be casual unless otherwise specified
- Be terse
- Suggest solutions that I didn't think about—anticipate my needs
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Value good arguments over authorities, the source is irrelevant
- Consider new technologies and contrarian ideas, not just the conventional wisdom
@heytulsiprasad
heytulsiprasad / sendMail.ts
Created December 21, 2024 07:43
Mail sender template nodemailer
"use server";
import nodemailer from "nodemailer";
const SMTP_SERVER_HOST = process.env.SMTP_SERVER_HOST;
const SMTP_SERVER_USERNAME = process.env.SMTP_SERVER_USERNAME;
const SMTP_SERVER_PASSWORD = process.env.SMTP_SERVER_PASSWORD;
const SITE_MAIL_RECIEVER = process.env.SITE_MAIL_RECIEVER;
const transporter = nodemailer.createTransport({
service: "gmail",
host: SMTP_SERVER_HOST,
port: 587,
@heytulsiprasad
heytulsiprasad / easygrid.py
Created December 5, 2024 14:52
Demo grid POV synthwave animation in blender
import bpy
import math
# Clear existing objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
# Create a series of wireframe cubes
num_cubes = 20 # Number of cubes
spacing = 2.0 # Distance between cubes
export const perspective = {
initial: {
scale: 0.9,
y: -150,
opacity: 0.5,
},
enter: {
scale: 1,
y: 0,
opacity: 1,
@heytulsiprasad
heytulsiprasad / PaginateApp.js
Created July 28, 2024 14:08 — forked from joeljerushan/PaginateApp.js
React Pagination with Firebase FireStore - (Prev / Next Pagination)
import React, { useState, useEffect } from 'react';
// I'm using react-bootstrap for UI elements
import { Table, Button, ButtonGroup } from 'react-bootstrap';
// Firebase config
import { getFirestore, collection, query, orderBy, limit, startAfter, endBefore, onSnapshot } from 'firebase/firestore';
import { getApp } from 'firebase/app';
export default function App() {
const [list, setList] = useState([]);
const [page, setPage] = useState(1);
@heytulsiprasad
heytulsiprasad / checkout_form.ts
Created July 19, 2024 12:38
I don't wanna lose this code as it's probably same as most checkout forms.
{/* Payment info card */}
<form
className="bg-white rounded-2xl px-10 py-8 w-full mt-6 widescreenConstraint"
onSubmit={handleSubmit}>
<h2 className="font-fredoka font-bold text-3xl">Payment Information</h2>
<input
type="tel"
name="cardNumber"
placeholder="Credit Card Number"
className="w-full mt-4 p-4 rounded-2xl border-[1px] border-lightGrey"
@heytulsiprasad
heytulsiprasad / detect-zoom.js
Last active December 23, 2023 16:59 — forked from abilogos/detect-zoom.js
Differenciate between resizing for zoom or just window resizing
//for zoom detection
px_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
function isZooming(){
var newPx_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
if(newPx_ratio != px_ratio){
px_ratio = newPx_ratio;
console.log("zooming");
return true;
}else{
{
"sync.gist": "c9c964ae99f2e35d5e2219b5dfd9b7ef",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"prettier.packageManager": "yarn",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@heytulsiprasad
heytulsiprasad / removeEdge.bat
Last active June 4, 2025 16:32
Removes edge browser from your system permanently
@echo off
:: Creator: Dave Kirkwood
:: Modified:By Britec
:: Created: 24/09/2020
:: Updated: 21/09/2022
::
:: First Stop Microsoft Edge Task
taskkill /F /IM msedge.exe >nul 2>&1