Skip to content

Instantly share code, notes, and snippets.

@ABIDULLAH786
ABIDULLAH786 / dropdown.js
Created April 18, 2024 06:46
mui dropdown
import * as React from 'react';
import IconButton from '@mui/material/IconButton';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import { MoreVerticalIcon } from '../../assets/icons/more-vertical';
import { customSuccessToast, successToast } from '../toast/toast';
const ITEM_HEIGHT = 48;
@ABIDULLAH786
ABIDULLAH786 / mui menu
Last active April 18, 2024 05:57
mui menu/dropdown for user avatar or profile
import React from 'react'
import { Tooltip, ListItemIcon, Menu, MenuItem, Divider, Box } from '@mui/material'
import { useNavigate } from 'react-router-dom';
import UserAvatar from '../UserAvatar';
import { makeStyles } from '@mui/styles';
import { LogoutIcon } from '../../../../assets/icons/logout-icon';
function UserMenu() {
const classes = useStyles();
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);
@ABIDULLAH786
ABIDULLAH786 / media-query-template.css
Created February 6, 2024 04:58
Media Query Template for Basic CSS
/**
* Basic CSS Media Query Template
* ------------------------------------------
* Responsive Grid Media Queries - 1280, 1024, 768, 480
* 1280-1024 - desktop (default grid)
* 1024-768 - tablet landscape
* 768-480 - tablet
* 480-less - phone landscape & smaller
* --------------------------------------------
*/
@ABIDULLAH786
ABIDULLAH786 / outputs.js
Last active January 22, 2024 12:25
JavaScript's code to practice the concepts.
// SCOPE CODE OUTPUT Ex-1
let b = 100;
{
var a = 10;
let b = 20;
const c = 30;
console.log(a)
console.log(b)
@ABIDULLAH786
ABIDULLAH786 / The default branch has been renamed!
Created January 17, 2024 13:57
The default branch has been renamed! If you have a local clone, you can update it by running the following commands.
git branch -m master main
git fetch origin
git branch -u main main
git remote set-head origin -a
@ABIDULLAH786
ABIDULLAH786 / Pushing Existing Project to GitHub
Last active January 17, 2024 13:46
Push an Existing Project to GitHub
git init
git add -A
git commit -m 'Added my project'
git remote add origin git@github.com:abidullah786/my-new-project.git
git push -u -f origin main
@ABIDULLAH786
ABIDULLAH786 / docker-help.md
Created August 28, 2023 03:25 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

const PI = 3.14159;
console.log(PI); // Output: 3.14159
/// Attempting to reassign a const variable will result in an error
PI = 3.14; Error: Assignment to constant variable.
@ABIDULLAH786
ABIDULLAH786 / App.js
Last active July 20, 2023 10:56
this is the audio recorder and saver of file to firebase
import storage from "./config/firebaseConfig";
import { ref, uploadBytesResumable, getDownloadURL } from "firebase/storage";
import { useEffect, useState } from "react";
import StorageWatcher from "./components/storageWatcher";
import uploadFileToFirebaseStorage from "./utils/uploadFileToFirebaseStorage";
import AudioRecorder from "./components/audioRecorder";
export default function App() {
// const [percent, setPercent] = useState(0);
// useEffect(() => {
@ABIDULLAH786
ABIDULLAH786 / Select Component.js
Last active July 18, 2023 18:58
this select option is fully functional with close on outside click feature and using tailwindcss
import { useEffect, useRef, useState } from "react";
export default function Select() {
const [expend, setExpend] = useState(false)
const [selectedOption, setSelectedOption] = useState("Select authentication type")
const ref = useRef()
const optionList = ["WPA", "WEP"]
useEffect(() => {
document.addEventListener("click", handleClickOutside, true);
document.body.style.overflow = 'hidden';
document.body.classList.add('modal-overlay')