Skip to content

Instantly share code, notes, and snippets.

View acarril's full-sized avatar

Alvaro Carril acarril

View GitHub Profile
@acarril
acarril / global-protect.md
Last active February 3, 2025 06:10
GlobalProtect toggle (start/quit)

Regain control over the annoying GlobalProtect macOS install

I need to use GlobalProtect because it's becoming the only VPN to access resources in my school. The VPN client is simple enough, but it does two annoying things:

  1. Registers itself to autostart on login
  2. Doesn't provide you with a simple 'quit' action

Here I'll show you how I fixed both issues in macOS 12.2 (Monterey).

image

@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
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.

@acarril
acarril / init.lua
Last active July 10, 2024 21:31
Global macOS hotkey for Wezterm
-- Function: Center and focus the main window of an application
function centerAndFocusMainWindow(app)
local mainWindow = app:mainWindow()
if mainWindow then
mainWindow:centerOnScreen(nil, true, 0)
mainWindow:focus()
end
end
-- Function: Watch for a specific application launch and execute a callback when launched