Skip to content

Instantly share code, notes, and snippets.

View AhmedAbdulrahman's full-sized avatar
🎯
Focusing

Ahmet Abdulrahman . Señor developer AhmedAbdulrahman

🎯
Focusing
View GitHub Profile
@AhmedAbdulrahman
AhmedAbdulrahman / WIN10.MD
Created October 30, 2022 22:02 — forked from hungneox/WIN10.MD
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

@AhmedAbdulrahman
AhmedAbdulrahman / NOTES.md
Created June 29, 2022 21:36 — forked from fatso83/NOTES.md
Installing Vagrant on Apple Silicon Macs (M1, M1X, etc)

VirtualBox only supports the x86 platform, so the default installation instructions for Vagrant does not work on Apple silicon. Thankfully Vagrant has a VMWare Provider (more on providers here), and so if I can get VMWare running on my M1 MacBook, I should be able to run Vagrant as well!

These are my notes during figuring this out.

Get the VMWare Tech Preview released in September 2021!

We are in luck, as VMWare released this just a few weeks ago.

  • See [their blog entry][1]
@AhmedAbdulrahman
AhmedAbdulrahman / App.jsx
Last active July 30, 2020 11:36
React Hooks Burger Menu
import React from "react";
import ReactDOM from "react-dom";
import Burger from "./Burger";
function App() {
const [isOpen, setOpen] = React.useState(false);
const node = React.useRef();
useOnClickOutside(node, () => setOpen(false));
return (
import React, { useState, useEffect } from 'react'
import Client from 'shopify-buy'
import Context from '@/context/StoreContext'
const client = Client.buildClient({
storefrontAccessToken: process.env.SHOPIFY_ACCESS_TOKEN,
domain: `${process.env.SHOP_NAME}.myshopify.com`,
})
@AhmedAbdulrahman
AhmedAbdulrahman / CountriesDropdown.js
Created January 20, 2020 21:50 — forked from mehiel/CountriesDropdown.js
React: use-dropdown hook
import React, { useRef } from "react";
import useDropdown from "use-dropdown";
function CountriesDropdown(props) {
const coutriesEl = useRef(null);
const countriesDropEl = useRef(null);
const [countriesDropOpen, toggleCountriesDrop] = useDropdown(countriesDropEl, coutriesEl);
const onClick = () => toggleCountriesDrop();
return (
@AhmedAbdulrahman
AhmedAbdulrahman / aliases.zsh
Created October 17, 2019 21:08
My favorite Git log aliases ❤️
alias logf='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'
alias logs='git log --date-order --all --graph --name-status --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'
alias loga='git log --graph --decorate --pretty=oneline --abbrev-commit --all'
alias logd='git log --graph --decorate --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit --date=relative --all'