Skip to content

Instantly share code, notes, and snippets.

Statement on MGM Resorts International: Setting the record straight
9/14/2023, 7:46:49 PM
We have made multiple attempts to reach out to MGM Resorts International, "MGM". As reported, MGM shutdown computers inside their network as a response to us. We intend to set the record straight.
No ransomware was deployed prior to the initial take down of their infrastructure by their internal teams.
MGM made the hasty decision to shut down each and every one of their Okta Sync servers after learning that we had been lurking on their Okta Agent servers sniffing passwords of people whose passwords couldn't be cracked from their domain controller hash dumps. Resulting in their Okta being completely locked out. Meanwhile we continued having super administrator privileges to their Okta, along with Global Administrator privileges to their Azure tenant. They made an attempt to evict us after discovering that we had access to their Okta environment, but things did not go according to plan.
On Sunday night, MGM implement
@PicoMitchell
PicoMitchell / get_compatible_macos_versions-asls.sh
Last active March 3, 2024 14:41
Scripts to get compatible macOS versions from Apple Software Lookup Service (gdmf.apple.com/v2/pmv) or Software Update Catalog (swscan.apple.com[...]sucatalog).
#!/bin/bash
#
# Created by Pico Mitchell (of Random Applications) on 1/5/23
#
# https://gist.github.com/PicoMitchell/877b645b113c9a5db95248ed1d496243#file-get_compatible_macos_versions-asls-sh
#
# MIT License
#
# Copyright (c) 2023 Pico Mitchell (Random Applications)
@pudquick
pudquick / 00-reproducible-mach-o.md
Last active November 13, 2023 16:09
Reproducible Builds for macOS

Reproducible Builds for macOS

There's a neat writeup I stumbled across recently titled "Reproducible codesigning on Apple Silicon" from Keith Smiley about some gotchas when it comes to compiling a binary in a way that's repeatable and always generates the exact same byte output (which would then checksum to the exact same hash) - even if compiled on a different Mac.

In applying the suggestions I found in the blog post, I found a few other corner cases that I just wanted to get documented more explicitly somewhere.

Tools Matter

Footnote 2 from that blog post is important:

@pudquick
pudquick / brew.md
Last active April 6, 2024 21:42
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@Chenx221
Chenx221 / recovery.json, cloudready_recovery.json
Last active October 30, 2023 17:55
Chrome OS recovery images manual download (Flex)
# Chrome OS recovery images manual download
https://dl.google.com/dl/edgedl/chromeos/recovery/recovery2.json
https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.json
# Google Chrome OS Flex images manual download
https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json
https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery.json
@pudquick
pudquick / isM1.py
Last active September 28, 2023 16:27
Determine if a Mac can run ARM64 code, whether or not the binary is running in Rosetta 2 via pyobjc
# https://developer.apple.com/documentation/corefoundation/3684868-cfbundleisarchitectureloadable?language=objc
# https://developer.apple.com/documentation/foundation/1495005-mach-o_architecture?language=occ
# https://developer.apple.com/documentation/foundation/1495005-mach-o_architecture/nsbundleexecutablearchitecturearm64?language=occ
from Foundation import NSBundle
import objc
CF = NSBundle.bundleWithPath_('/System/Library/Frameworks/CoreFoundation.framework')
f = [('CFBundleIsArchitectureLoadable', 'BQ')]
objc.loadBundleFunctions(CF, globals(), f)
NSBundleExecutableArchitectureARM64 = 0x0100000c

Minecraft on Apple Silicon

In this gist, you can find the steps to run Minecraft 1.16.4 natively on Apple Silicon (AS), without needing Rosetta 2 translation of the dependencies (mainly LWJGL and related libraries).

While it's possible to use a launcher like MultiMC to have a prettier way to run the game on AS, it requires installing even more dependencies (like QT) which take time and are difficult to distribute. Therefore, I've put together a command line-based launcher tool using a couple shell & Python scripts.

To get up and running quickly, follow the steps below. Otherwise, for more detail, watch my YouTube video.

Download my package

@ghifarit53
ghifarit53 / README.md
Last active December 16, 2023 01:09
[i3] big sur like polybar style

macOS Big Sur on Linux!

bigsurlinux

to replicate the bar and the blur effect, you'll need

  • polybar
  • fontawesome and sf pro text
  • compton tryone fork (you can use picom too, but i don't know if the config is compatible)

you can adjust the bar opacity by editing the number in the bar background color (0-100)

@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{