Skip to content

Instantly share code, notes, and snippets.

View Oscarz90's full-sized avatar
🤓
coding...

Oscar Oscarz90

🤓
coding...
View GitHub Profile
Data Structures
- Stacks
- Queues
- Linked lists
- Graphs
- Trees
- Tries
Concepts
- Big O Notation
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@sluger
sluger / AsyncMuiAutocomplete.test.tsx
Last active August 30, 2024 22:13
Testing MUI (@mui/material) autocomplete component with react-testing-library and async options simulated by a sleep
import Asynchronous from './AsyncAutocomplete';
import { render, screen, fireEvent, waitFor, prettyDOM, within } from '@testing-library/react';
describe('Async autocomplete', () => {
it('renders options', async () => {
render(<Asynchronous></Asynchronous>);
await waitFor(() => expect(screen.getAllByText('Asynchronous')).toBeDefined());
const combobox = screen.getByRole('combobox');