Create Windows bootable USB with macOS

If you need to create a Windows 10 installation USB key using a macOS, you can use these commands to do it simply.
This procedure deletes all data from the USB stick, so be careful 🙂

Open Terminal and use the following commands

diskutil list
diskutil eraseDisk MS-DOS "WIN10" GPT <USB disk>
hdiutil mount <path to the Windows 10 ISO file>
cp -rp /Volumes/<ISO mounting point> /Volumes/WIN10
hdiutil unmount /Volumes/<ISO mounting point>
hdiutil unmount /Volumes/WIN10

macOS disable WIFI on logout

I recently started using an Apple notebook as a development laptop. I realized that when I block the screen the WIFI connection goes down. This is a wanted behavior and can be changed using this command:

cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources
sudo ./airport en1 prefs DisconnectOnLogout=NO

Obviously you need to replace “en1” with the identifier of your WIFI interface.