Skip to content

Instantly share code, notes, and snippets.

View Muhammed-Rahif's full-sized avatar
💻
................................................................................

Muhammed Rahif Muhammed-Rahif

💻
................................................................................
View GitHub Profile
@noxify
noxify / shadcn-chart-recharts-v3.tsx
Last active October 24, 2025 17:00
Recharts V3 with shadcn/ui - currently WIP
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
"use client"
import type { NameType, ValueType } from "recharts/types/component/DefaultTooltipContent"
import * as React from "react"
import * as RechartsPrimitive from "recharts"
@Muhammed-Rahif
Muhammed-Rahif / README.md
Last active June 22, 2025 16:09
Set of standard labels for new GitHub repositories.
@ilkou
ilkou / shadcn-ui react-select.jsx
Created March 26, 2024 13:54
react-select with shadcn/ui
/* ----------- simple-select.js ----------- */
import * as React from 'react';
import Select from 'react-select';
import type { Props } from 'react-select';
import { defaultClassNames, defaultStyles } from './helper';
import {
ClearIndicator,
DropdownIndicator,
MultiValueRemove,
Option
import 'package:flutter/widgets.dart';
// From https://gist.github.com/ltOgt/3771c824fc1c8811f5ec1a81a9a4937b
/// Conditionally wrap a subtree with a parent widget without breaking the code tree.
///
/// [condition]: the condition depending on which the subtree [child] is wrapped with the parent.
/// [child]: The subtree that should always be build.
/// [parentBuilder]: builds the parent with the subtree [child].
///
@mjbalcueva
mjbalcueva / password-input.tsx
Last active October 16, 2025 21:03
shadcn ui custom password input
'use client'
import * as React from 'react'
import { EyeIcon, EyeOffIcon } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { Input, type InputProps } from '@/components/ui/input'
import { cn } from '@/lib/utils'
const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
@mjbalcueva
mjbalcueva / calendar.tsx
Last active October 26, 2025 08:42
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@Muhammed-Rahif
Muhammed-Rahif / islamic-quiz-api.json
Last active January 11, 2023 13:51
Islamic Quiz Api Json
[
{
"question": "What is the name of the holy book of Islam?",
"answers": ["The Qur'an", "The Bible", "The Vedas", "The Sutras"],
"source": "....Quran was revealed as a guide for humanity with clear proofs of guidance and the standard ˹to distinguish between right and wrong˺.... -Qur'an, Surah Al-Baqarah 2:185",
"answerIndex": 0
},
{
"question": "Which of the following is not one of the Five Pillars of Islam?",
"answers": ["Prayer", "Fasting", "Charity", "Hiking"],
@sindresorhus
sindresorhus / esm-package.md
Last active October 31, 2025 00:11
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@Muhammed-Rahif
Muhammed-Rahif / express-app.js
Last active September 6, 2021 14:56
This is a mongodb localhost:27017 connection code in node js express. We can connect simply mongodb(PORT: localhost:27017 ) to our node js project as this code...
db.connect((err)=>{
if (err) {
console.log("Database connection Error :"+err);
}else{
console.log("Database connected to port 27017");
}
})