Skip to content

Instantly share code, notes, and snippets.

View josephvusich's full-sized avatar

Joseph Vusich josephvusich

View GitHub Profile
@josephvusich
josephvusich / Adding a Physical Disk to Parallels.md
Created September 12, 2023 18:45 — forked from Obbut/Adding a Physical Disk to Parallels.md
Adding a second physical disk to Parallels

Adding a second physical disk to Parallels Desktop 14

I wanted my (NTFS) data disk to be accessible from my boot camp Parallels VM. Parallels provides no support for this, so I tried it myself.

I duplicated the disk file that Parallels created and started poking around, and after half an hour or so, had success. This is what you need to do.

My boot camp disk is at /dev/disk0. My data disk is at /dev/disk1.

These instructions are provided for educational use only and without guarantees. If you lose data because of this, blame yourself, and only follow them if you know what you are doing.

@josephvusich
josephvusich / isexist_vs_isnotexist.go
Created March 14, 2021 20:13 — forked from mastef/isexist_vs_isnotexist.go
os.IsExist(err) vs os.IsNotExist(err)
/*
Watch out, os.IsExist(err) != !os.IsNotExist(err)
They are error checkers, so use them only when err != nil, and you want to handle
specific errors in a different way!
Their main purpose is to wrap around OS error messages for you, so you don't have to test
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and
"file does not exist/directory does not exist"
@josephvusich
josephvusich / markdown-details-collapsible.md
Created February 24, 2021 23:30 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
function runAutoArchive() {
// start config
var age = 28; // days
// end config
var start = 0;
var batch = 100;
var maxDate = new Date();
var total = 0;
maxDate.setDate(maxDate.getDate()-age);
@josephvusich
josephvusich / delete_git_submodule.md
Created March 17, 2019 04:14 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule