Skip to content

Instantly share code, notes, and snippets.

@Prottoy2938
Prottoy2938 / history.jsx
Created May 10, 2024 11:25
History Section
import React, { useRef, useEffect, useState } from "react";
import { RxCross2 } from "react-icons/rx";
import { motion } from "framer-motion";
import { BiDotsHorizontalRounded } from "react-icons/bi";
import { useLocation } from "react-router-dom";
import { Rings } from "react-loader-spinner";
function checkIfArraysEmpty(obj) {
for (let key in obj) {
if (Array.isArray(obj[key]) && obj[key].length > 0) {
const functions = require("firebase-functions");
const admin = require("firebase-admin");
const privateKey = "";
const clientEmail = "";
const projectId = "";
if (!admin.apps.length) {
admin.initializeApp({
credential: admin.credential.cert({
@Prottoy2938
Prottoy2938 / test.json
Created December 21, 2023 10:59
Postmaptest.json
{"UserId":"12xxxx",
"PlatformID": ["twitter"],
"Description": "Hello World",
"Hashtags": ["#watch", "#cartier"],
"Mentions": ["@someone", "@else", "@here"],
"Image": ["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAeAB4AAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAHgAnEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA
@Prottoy2938
Prottoy2938 / bluedeli-product-page.liquid
Created November 21, 2023 22:21
bluedeli-product-page upwork
{% comment %}
@param class_root {String}
Base class root
@param show_range {Bool}
Show price range
@param price_range_format {String}
'range' or 'from', defaults to 'range'
@Prottoy2938
Prottoy2938 / delete.json
Created June 20, 2023 09:28
Chaptgpt prompt
[
{
"role": "system",
"content": "Imagine you're an expert product reviewers that tries to give insight on specific and important details based on reviews"
},
{
"role": "user",
"content": "This is the first product: Budge Lite Car Cover Dirtproof, Scratch Resistant, Breathable, Dustproof, Car Cover Fits Sedans up to 264\", Gray and here are its reviews from other people, I'll send more reviews in a bit: [{\"rating\":\"5.0 out of 5 stars\",\"title\":\"5.0 out of 5 stars\\n\\n\\n\\n\\n\\n\\n\\n \\n \\n Not suitable for 98+ Lincoln hood ornament modifications\",\"text\":\"I ordered this cover for a 1998 Lincoln Town Car. Its the right size, it wards off dust just like it says. I ordered just the dust cover and surprisingly its a tad “water resistant”. By that i mean any part of the cover that isn’t directly laying flat on your car will “roll” water off the side. Pretty cool! I ordered and used Amazon’s size confirming feature to make sure it would fit the 1998 lincoln town car i meant
@Prottoy2938
Prottoy2938 / gist:406070a628f2588cb3f5ed943f2f6e8b
Last active July 21, 2021 22:17
Where to donate money to
1. Colt Steele
2. Khan Academy
3. Udemy
4. 1337x.to
5. Krita (Maybe)
6. Take M. Rahmat to Australia
7. Buy Mehedi Hasan (hasan not sure) something pricy, he was a good teacher
@Prottoy2938
Prottoy2938 / Chattogram Collegiate School Annual Study Tour 2020 Markdown.md
Created December 3, 2020 08:26
Chattogram Collegiate School Annual Study Tour 2020 Markdown

Chattogram Collegiate School Annual Study Tour 2020

Visit to the National Liberation War Museum, Dhaka on 14th January, 2021


Students of Grade 6, 7, and 8,

@Prottoy2938
Prottoy2938 / change-svg-color-code-demo-medium.js
Created November 19, 2020 07:50
Change SVG Color application code demo medium
//Suppose you have an svg element defined in html like this:
<img src="/profile.svg" alt="some svg" id="my-svg"/>
//to change its color, you can do this in the css:
#my-svg {
filter: invert(19%) sepia(48%) saturate(1556%) hue-rotate(223deg) brightness(91%) contrast(123%);
}
@Prottoy2938
Prottoy2938 / rgba-to-css-filter.js
Last active November 5, 2020 08:28
RGBA To CSS Filter Converter. This code is a slightly modified version of this stackoverflow answer: https://stackoverflow.com/a/43960991/604861
"use strict";
class Color {
constructor(r, g, b) {
this.set(r, g, b);
}
toString() {
return `rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(
this.b
)})`;