Skip to content

Instantly share code, notes, and snippets.

@startergo
startergo / msys2_git.md
Last active January 8, 2025 01:16
Git credentials manager add support for a MSYS2 Shell

https://github.com/git-for-windows/git/wiki/Install-inside-MSYS2-proper

  • Open a PowerShell as administrator, and enter the following command:
New-Item -ItemType SymbolicLink -Path 'C:\msys64\opt\git-for-windows-mingw64-bin' -Target 'C:\Program Files\Git\mingw64\bin'

This asumes that both paths exist and you have both Git for Windows and MSYS2 installed on those default locations, change them according to your needs.

  • Next, add the following 2 lines to your .gitconfig file in you MSYS2 homefolder:
[credential]
  • How to add your terminal to Developer Tools:
  • Run sudo spctl developer-mode enable-terminal in your terminal.
  • Go to System Preferences, and then to Security & Privacy.
  • Under the Privacy tab, an item called Developer Tools should be present. Navigate to it.
  • Ensure that your terminal is listed and enabled. If you're using a third-party terminal like iTerm, be sure to add it to the list. (You may have to click the lock in the bottom-left corner and authenticate.)
  • Restart your terminal.
@startergo
startergo / vmware_admin.md
Created December 3, 2024 11:20
Error: You must have administrative privileges to modify or repair this installation (VMware)
  • Find the Installer in C:\Windows\Installer\ by opening Windows explorer search and enable search in file contents: image

  • Run this command in elevated command prompt:

msiexec.exe /i "C:\Windows\Installer\171d2a.msi"
@startergo
startergo / CPUID.cs
Last active December 2, 2024 08:53
CPUID,cs C# code for generation of an executable
using System;
namespace CPUID
{
using System;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
@startergo
startergo / ntfs-3g_macOS.md
Last active December 1, 2024 15:09
Installing NTFS-3g on macOS
brew tap gromgit/homebrew-fuse
brew install ntfs-3g-mac
  • Or with MacPorts:
sudo port install NTFS-3g
@startergo
startergo / qemu-img.md
Last active March 8, 2025 01:25
How to: Use qemu-img command to convert between vmdk, raw, qcow2, vdi, vhd, vhdx formats/disk images (qemu-img create, snapshot, resize etc.)
  • First we need to have qemu installed on the system, for most of Linux systems, we can install “qemu-utils” for Windows we can download QEMU disk image utility from here

  • Other related questions

How to open raw disk from VMware
How to open qcow2 disk from VMware
How to open vdi disk from VMware
How to open raw disk from Hyper-V
How to open qcow2 disk from Hyper-V
How to open vdi disk from Hyper-V
@startergo
startergo / haxm_qemu.md
Last active November 27, 2024 02:19
QEMU with enabled HAXM acceleration on Windows
$bcdedit /set hypervisorlaunchtype off
@powershell -ExecutionPolicy RemoteSigned -Command "C:\<dgreadiness_location>\dgreadiness_v3.6\dgreadiness_v3.6\DG_Readiness_Tool_v3.6.ps1 -Disable"
  • Check Installation:
@startergo
startergo / convert_folder_iso.md
Created November 27, 2024 00:20
Convert folder to ISO for access in QEMU on Windows

Fast way to convert some folders on your host machine to .iso files so that you can mount them as CDs on your guest OS. This is a way of how to do it. Save code from New-ISOFile/New-ISOFile.ps1 at main · TheDotSource/New-ISOFile as New-ISOFile.ps1 on your computer. Check if the code source is safe. Open Windows command prompt under a normal user Navigate to the folder where you've saved New-ISOFile.ps1 using the command prompt. Run this command:

powershell -ExecutionPolicy Bypass -noprofile -c "& {  . .\New-ISOFile.ps1; New-ISOFile -source 'C:\Downloads\folder_you_want_to_convert_to_iso\' -destinationIso C:\folder_not_requiring_admin_priveleges_to_save_into_it\testiso.iso }"

Now, you can launch qemu so that your guest OS see that .iso file as a mounted CDROM.

@startergo
startergo / automake.md
Last active November 15, 2024 10:59
How to use Automake
  • Install Autotools
  • Use autoreconf -vfi so that it runs all the relevant tools in the right order, and installs the missing files
  • Run:
aclocal
automake
autoconf
  • Configure the build: