Skip to content

Instantly share code, notes, and snippets.

View Fashad-Ahmed's full-sized avatar
Aiming High

Fashad Ahmed Fashad-Ahmed

Aiming High
View GitHub Profile
@Fashad-Ahmed
Fashad-Ahmed / react-router-dom-v.6.02.prompt.blocker.js
Created November 13, 2024 16:02 — forked from rmorse/react-router-dom-v.6.02.prompt.blocker.js
Adds back in `useBlocker` and `usePrompt` to `react-router-dom` version 6.0.2 (they removed after the 6.0.0 beta, temporarily)
/**
* These hooks re-implement the now removed useBlocker and usePrompt hooks in 'react-router-dom'.
* Thanks for the idea @piecyk https://github.com/remix-run/react-router/issues/8139#issuecomment-953816315
* Source: https://github.com/remix-run/react-router/commit/256cad70d3fd4500b1abcfea66f3ee622fb90874#diff-b60f1a2d4276b2a605c05e19816634111de2e8a4186fe9dd7de8e344b65ed4d3L344-L381
*/
import { useContext, useEffect, useCallback } from 'react';
import { UNSAFE_NavigationContext as NavigationContext } from 'react-router-dom';
/**
* Blocks all navigation attempts. This is useful for preventing the page from
* changing until some condition is met, like saving form data.
@Fashad-Ahmed
Fashad-Ahmed / Assets
Created August 28, 2022 20:22 — forked from adrianhajdin/Assets
React Native - NFT Marketplace
https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/adrianhajdin/react-native-nft-marketplace/tree/main/assets
@Fashad-Ahmed
Fashad-Ahmed / Assets
Created August 28, 2022 20:22 — forked from adrianhajdin/Assets
React Native - NFT Marketplace Showcase
https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/adrianhajdin/nft-marketplace-showcase/tree/main/src/assets

GraphQL Queries & Mutations

These are the GraphQL queries and mutations for the YouTube course.

Get names of all clients

{
  clients {
    name
 }
@Fashad-Ahmed
Fashad-Ahmed / ms_coco_classnames.txt
Created May 8, 2022 15:17 — forked from AruniRC/ms_coco_classnames.txt
Class Names of MS-COCO classes in order of Detectron dict
{0: u'__background__',
1: u'person',
2: u'bicycle',
3: u'car',
4: u'motorcycle',
5: u'airplane',
6: u'bus',
7: u'train',
8: u'truck',
9: u'boat',
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@Fashad-Ahmed
Fashad-Ahmed / Install PyQt5 on Ubuntu with python3 .md
Created January 9, 2022 09:01 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@Fashad-Ahmed
Fashad-Ahmed / typescript-crash.ts
Created January 6, 2022 11:56 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="jt"
# Example aliases