Skip to content

Instantly share code, notes, and snippets.

@rimidl
rimidl / bootable-win-on-mac.md
Last active June 18, 2025 20:53 — forked from acarril/bootable-win-on-mac.md
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.

Поставщик

контакты Контакт поставщика
краткое наименование *
полное наименование *
ИНН
ОГРН
КПП
ОКПО
телефон
@rimidl
rimidl / ruby_encoding_marker.rb
Created June 5, 2012 12:04
RubyEncodingMarker - скрипт, занимающийся вставкой информации о кодировке файла необходимой для корректной работы Ruby 1.9. Полезен при переходе со старой версии Ruby.
# -*- encoding: utf-8 -*-
# file name: ruby_encoding_marker.rb
#
# @example Use in console:
# $ ruby ruby_encoding_marker.rb app/controllers
#
module RubyEncodingMarker
UTF8 = '# -*- encoding: utf-8 -*-'
@rimidl
rimidl / gist:2818363
Created May 28, 2012 10:22
nginx settings for ssl connection with rails app
$ cat /etc/nginx/sites-enabled/ssl.myapp.com
upstream evrmyapp_ssl {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
# for UNIX domain socket setups:
server unix:/tmp/myapp.socket fail_timeout=0;
}