Skip to content

Instantly share code, notes, and snippets.

@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active May 28, 2026 05:34
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@ccbrown
ccbrown / DumpHex.c
Last active May 14, 2026 02:34
Compact C Hex Dump Function w/ASCII
#include <stdio.h>
void DumpHex(const void* data, size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i) {
printf("%02X ", ((unsigned char*)data)[i]);
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') {
ascii[i % 16] = ((unsigned char*)data)[i];
@piotrkundu
piotrkundu / msys2_with_git_for_windows.md
Last active May 8, 2026 08:33
Full MINGW64 environtment with MSYS2 instead of Git Bash for Windows

BACKGROUND (WHY?)

I switch dev-environments every single year with each customer having their own setup. Git on Linux and MacOSX just works most of the time - there are some SSH keys needed to be setup, but "sudo apt-get" or "brew install" mostly does the trick.

Git for Windows is a box a sourcery, so when you install that you will get a version of slim MSYS2, MinGW64 and most importantly bash and git that runs from the bash. This is what you need 9 out of 10 times, if you ONLY need to use git to manage your source and then use other/external toolchains like VS Code, VS2022 or Windows Powershell or Command to compile your sh.ttt I mean stuff.

Then that 10th out of 10 times, you want to compile windows applications from the same terminal that you run git - just like you do on linux or OSX. If you are running Windows alone then having two terminals, one for git (with mingw64/msys2) and one for your ms whatever the compiler name is for C++.

@sorny
sorny / x11_forwarding_macos_docker.md
Last active May 5, 2026 19:46
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)
  • Macbook Pro (Intel)
@itsmikita
itsmikita / README.md
Last active May 5, 2026 17:18
Create bootable USB drive from InstallMacOSX.pkg

Create bootable USB drive from InstallMacOSX.pkg

  1. Erase USB drive with Disk Utility using format Mac OS Extended (Journaled) and Master Boot Record and call it MyVolume
  2. Use Finder to mount/open InstallMacOSX.dmg.
  3. Run following commands:
pkgutil --expand /Volumes/Install\ OS\ X/InstallMacOSX.pkg /tmp/El\ Capitan
diskutil eject Install\ OS\ X
cd /tmp/El\ Capitan
@dakanji
dakanji / Install_USB_Maker.sh
Last active April 26, 2026 17:44
Creates Bootable USB for Mac OS Lion to Monterey (Excluding Mavericks)
#!/usr/bin/env bash
# Install_USB_Maker.sh
# Copyright (c) 2020 - 2026 Dayo Akanji
# - dakanji@users.sourceforge.net
# Portions Copyright (c) Jeff Geerling
# - https://github.com/geerlingguy/macos-virtualbox-vm/blob/master/LICENSE
#
# MIT License
@ChrisTollefson
ChrisTollefson / Boot Camp Assistant - USB Install Disk.md
Last active April 26, 2026 08:54
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows
@Wowfunhappy
Wowfunhappy / Redirect.md
Last active April 23, 2026 13:37
Download a Mac OS X 10.9 Mavericks installer image Apple

The Mac OS X 10.9 Mavericks download script is now hosted on Mavericks Forever. To download Mavericks, open a Terminal on any Mac and run:

curl mavericksforever.com/get.sh | sh

Or, navigate directly to mavericksforever.com/get.sh to read what the script does.

@nohajc
nohajc / ntfs-mac-utils-download.sh
Created July 20, 2025 11:56
Download chkntfs and other NTFS utils for macOS (by Paragon)
#!/bin/sh
set -e
DMG_NAME=ntfsmac17_trial.dmg
curl -LO "https://dl.paragon-software.com/demo/$DMG_NAME"
DMG_PATH=$(hdiutil attach -nobrowse -readonly "$DMG_NAME" | grep /Volumes | awk '{print $3}')
TMP_PATH=/tmp/paragon-ntfs-pkg
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active April 8, 2026 08:28
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network