Skip to content

Instantly share code, notes, and snippets.

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

Kazi Shariful Islam kazi331

🏠
Working from home
View GitHub Profile
@kazi331
kazi331 / passwordcheck.js
Created October 30, 2025 19:39
React Minimal Password checker
const { useState } = React;
const PasswordStrength = () => {
const [password, setPassword] = useState('');
const requirements = [
{ label: '8+ characters', check: (pwd) => pwd.length >= 8 },
{ label: '12+ characters', check: (pwd) => pwd.length >= 12 },
{ label: 'Lowercase letter', check: (pwd) => /[a-z]/.test(pwd) },
{ label: 'Uppercase letter', check: (pwd) => /[A-Z]/.test(pwd) },
@kazi331
kazi331 / setup_better_auth.md
Created October 7, 2025 17:24
Setup better-auth in next.js with prisma and sqlite

Minimal Setup: Better Auth + Prisma (SQLite/Postgres)

This guide shows how to set up Better Auth with Prisma and a database (SQLite or Postgres) in a Next.js project.


1. Install dependencies

# Core dependencies
@kazi331
kazi331 / utils.ts
Created September 2, 2025 13:56
most used cn function file in tailwindcss projects
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
@kazi331
kazi331 / kill.sh
Last active March 18, 2025 09:04
check and kill running process in windows and linux
# for windows
PS C:\Users\sayem> netstat -aon | findstr :3000
TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 12008
TCP [::]:3000 [::]:0 LISTENING 12008
PS C:\Users\sayem> taskkill /PID 12008 /F
SUCCESS: The process with PID 12008 has been terminated.
PS C:\Users\sayem>
#for linux
lsof -i :3000
@kazi331
kazi331 / readme.md
Created June 29, 2024 15:00
Linux Mint Cinnamon Bluetooth keyboard connection issue fixed

First, make sure the local Bluetooth controller (e.g. a Bluetooth dongle the built in Bluetooth radio) is recognized:

lsusb

lsusb

bluetoothctl

bluetoothctl
@kazi331
kazi331 / .Xmodmap
Last active April 5, 2024 18:11
Key remap on linux. How to remap keyboard keys on linux
keycode 117 = End
@kazi331
kazi331 / Steps.tsx
Created March 10, 2024 07:25
Very simple react step component with typescript
import { Check } from "lucide-react";
export default function Steps({ steps, currentStep = 1 }: { steps: string[], currentStep?: number }) {
return (
<div className="flex gap-x-0 -mx-4 lg:-ms-0 overflow-auto py-4">
{steps.map((step, index) => (
<div key={index} className="flex flex-col items-center px-4 gap-2 relative step-circle-container ">
<div className={`${currentStep > index + 1 ? 'before:bg-gray-700 after:bg-gray-700 border-gray-700' : 'before:bg-gray-300 after:bg-gray-300 border-gray-300'} h-5 w-5 bg-white border rounded-full step-circle flex items-center justify-center `}>
<div className={`${currentStep > index + 1 ? 'scale-100 w-full h-full' : currentStep == index + 1 ? ' scale-100 h-1.5 w-1.5' : 'scale-0'} flex items-center justify-center rounded-full bg-gray-700 `}>
@kazi331
kazi331 / vercel.json
Created January 27, 2024 08:59
Add this file into the root of express server to deploy on vercel
{
"version": 2,
"builds": [
{
"src": "app.js",
"use": "@vercel/node"
}
],
"routes": [
{
@kazi331
kazi331 / mongo-install.md
Created December 31, 2023 18:39
mongodb isntallation step by step procedure

installation of mongodb server and compass : https://www.mongodb.com/docs/mongodb-shell/install/

step 1: import the public key used by the package management system

wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-7.0.asc

If you receive an error indicating that gnupg is not installed, perform the following steps:

@kazi331
kazi331 / animation.html
Created November 30, 2023 09:37
Colorful Glowing Liquid loading animation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Colorful Glowing Liquid</title>
<!-- Custom Styles -->
<style>