Skip to content

Instantly share code, notes, and snippets.

@shahbaz-raza5
shahbaz-raza5 / shah
Created October 1, 2024 01:20
useDispatch
const dispatch = useDispatch();
let name = userData.login;
localStorage.setItem("Your_Name", name);
const [myData, setmyData] = useState([]);
const [click, setClick] = useState(true);
@shahbaz-raza5
shahbaz-raza5 / file.js
Created October 1, 2024 01:23
use state description
const [formData, setFormData] = useState({
fullName: user?.name || "",
email: user?.email || "",
phoneNumber: user?.phone || "",
dateOfBirth: "",
doctorName: `${firstName} `, // Combine first name and last name
specialization: specialization, // Add specialization
patientId: user?.patientId || "",
doctorId: id,
appointmentDate: "",

Running a MacOS 13 Ventura VM in VMware

Installing and Configuring VMware

💡 NOTE: MacOS higher than version 12 requires a CPU with AVX2 instruction support

  1. Download a MacOS Ventura .iso Download OR create your own https://youtu.be/JFMvUpdCMwo
  2. Download VMware Workstation Player Download
  3. Download MacOS Unlocker for VMware Workstation Download
  4. Install VMware Workstation Player, accepting the defaults
@secemp9
secemp9 / mediapipe_landmark.py
Created September 30, 2024 02:31
fixed yacine code
import cv2
import numpy as np
import mediapipe as mp
# Initialize mediapipe Face Mesh and Hands solutions
mp_face_mesh = mp.solutions.face_mesh
mp_hands = mp.solutions.hands
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
@ijat
ijat / gist:e843c541f4bf2e2ea7abd5258d2b804a
Created December 12, 2020 10:02
How to remove Command Bar in OldNewExplorer for Windows 10 (Tested on 20H2)
1. Download your OldNewExplorer 1.1.9. If you already install, uninstall the extension again.
2. Download Resource Hacker.
3. Run Resource Hacker, and open OldNewExplorer64.dll.
4. Expand STYLE_FLAT or STYLE_CREAMY (your choice), then select 1:1033.
5. Ctrl+F to open Find window, and search for FolderBandStyle. You'll find something like this "<style resid="FolderBandStyle">"
6. Then, below that line, enter this text: <Element padding="rect(0rp,0rp,0rp,-44rp)"/>
7. Repeat step 5-6 by finding this keyword: CPLFolderBandStyle
8. Click Compile Script (play icon) or press F5.
9. Save the dll using same name (overwrite).
10. Repeat step 3-9 by opening OldNewExplorer32.dll
@fernandoaleman
fernandoaleman / mysql2-m1.md
Last active October 1, 2024 01:46
How to install mysql2 gem on m1 Mac

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

[
{ code: 'AD', label: 'Andorra', phone: '376', phoneLength: 6},
{ code: 'AE', label: 'United Arab Emirates', phone: '971', phoneLength: 9},
{ code: 'AF', label: 'Afghanistan', phone: '93', phoneLength: 9},
{ code: 'AG', label: 'Antigua and Barbuda', phone: '1-268', phoneLength: 10},
{ code: 'AI', label: 'Anguilla', phone: '1-264', phoneLength: 10},
{ code: 'AL', label: 'Albania', phone: '355', phoneLength: 9},
{ code: 'AM', label: 'Armenia', phone: '374', phoneLength: 6},
{ code: 'AO', label: 'Angola', phone: '244', phoneLength: 9},
{ code: 'AQ', label: 'Antarctica', phone: '672', phoneLength: 6},
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active October 1, 2024 01:44
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@rya-sge
rya-sge / Awesome-blockchain-learning-resources.md
Last active October 1, 2024 01:42
Awesome blockchain learning resources

List of several courses on blockchain and cryptography

When the course is followed by ***, it means that I have followed, at least partially and I recommend it.

DeFi / General Concepts

This section lists the course to learn the general concepts related to Defi.

Beginner