Skip to content

Instantly share code, notes, and snippets.

Install patched qt 5.9: https://github.com/Wowfunhappy/qt5.9-base-mavericks
sudo port install clang-13 cmake meson ninja graphviz git realpath
git clone --recurse-submodules https://github.com/rizinorg/cutter
mkdir build-cutter && cd build-cutter
cmake \
-DCMAKE_PREFIX_PATH=/usr/local/Qt-5.9.9/ \
#!/bin/sh
test -e /Library/LaunchAgents/com.lookingglassfactory.holoplayservice.plist || echo "Please attempt to install the HoloPlay Service service. Once the installation fails, re-run this script." && exit 1
sudo defaults write /Library/LaunchAgents/com.lookingglassfactory.holoplayservice EnvironmentVariables -dict DYLD_INSERT_LIBRARIES /Library/Application\ Support/Looking\ Glass\ Factory/HoloPlayService/HoloPlayServiceMavericksWorkarounds.dylib
sudo chown root:wheel /Library/LaunchAgents/com.lookingglassfactory.holoplayservice.plist
sudo chmod 644 /Library/LaunchAgents/com.lookingglassfactory.holoplayservice.plist
uudecode "$0" | gzip -d > /Library/Application\ Support/Looking\ Glass\ Factory/HoloPlayService/HoloPlayServiceMavericksWorkarounds.dylib
launchctl load /Library/LaunchAgents/com.lookingglassfactory.holoplayservice.plist
launchctl start com.lookingglassfactory.holoplayservice
exit 0
@Wowfunhappy
Wowfunhappy / ipc_mqueue
Last active March 5, 2022 01:31
Modified version of kern_event.c to stop XNU 2422.115.4 to panic when running Chromium Legacy. See: https://github.com/blueboxd/chromium-legacy/issues/44
/*
* Copyright (c) 2000-2007 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
@Wowfunhappy
Wowfunhappy / gist:2fca7ed5d1b1310de3854b92c65eef7e
Created January 22, 2022 13:24
Building XNU for OS X 10.9.5.
# Install Xcode 5.0.2. Later versions will not work.
git clone https://github.com/apple-oss-distributions/xnu.git
cd xnu/
git checkout d2a0abf2ede8152c5a107fe51e032c1193d2015b
cd ..
git clone 'https://github.com/apple-oss-distributions/dtrace.git'
cd dtrace/
git checkout cdf0eec474eafb19dbb2c998320aaad28f755d0b
@Wowfunhappy
Wowfunhappy / Get Refresh Rate.mm
Created January 16, 2022 19:23
Get Refresh Rate
CGDirectDisplayID displays;
uint32_t matchingDisplayCount = 1;
CGGetDisplaysWithRect([[NSApp mainWindow]frame], 1, &displays, &matchingDisplayCount);
double realRefreshRate = CGDisplayModeGetRefreshRate(CGDisplayCopyDisplayMode(displays));
@Wowfunhappy
Wowfunhappy / .gclient
Last active October 9, 2021 18:53 — forked from blueboxd/.gclient
solutions = [
{ "name" : 'src',
"url" : 'https://github.com/Wowfunhappy/chromium-legacy.git',
"deps_file" : 'DEPS',
"managed" : False,
"custom_deps" : {
},
"custom_vars": {
"checkout_pgo_profiles": True,
},
@Wowfunhappy
Wowfunhappy / Portfile
Last active June 6, 2021 12:28
Build Godot 3.3.2 for Mavericks
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
github.setup godotengine godot 3.3.2 "" -stable
revision 1
categories games graphics multimedia
platforms darwin
license MIT
@Wowfunhappy
Wowfunhappy / ChromiumMavericksWorkarounds.m
Created February 6, 2021 20:25
Compile this into a dylib and inject with DYLD_INSERT_LIBRARIES to make Chromium Legacy work on Mavericks
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
#import "ZKSwizzle.h"
#define DYLD_INTERPOSE(_replacement,_replacee) \
__attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee \
__attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacement, (const void*)(unsigned long)&_replacee };
//Left to its own devices, Mavericks CoreFoundation will release a CTFontRef which Chromium later
@Wowfunhappy
Wowfunhappy / web-sharing.sh
Last active December 4, 2020 21:18
Enable Apache
#!/bin/bash
if (( $(echo "${OSTYPE:6} > 13" | bc -l) ))
then
mkdir ~/Sites ; sudo bash -c "printf '<Directory \"/Users/`whoami`/Sites/\">\n\tAddLanguage en .en\n\tAllowOverride All\n\tOptions Indexes MultiViews FollowSymLinks\n\tRequire all granted\n</Directory>' > /etc/apache2/users/`whoami`.conf ; echo 'AddDefaultCharset utf-8' >> /etc/apache2/httpd.conf ; sed -i '' '/LoadModule userdir_module libexec\/apache2\/mod_userdir.so/s/^#*//g' /etc/apache2/httpd.conf ; sed -i '' '/LoadModule php[0-9]*_module libexec\/apache2\/libphp[0-9]*.so/s/^#*//g' /etc/apache2/httpd.conf ; sed -i '' '/Include \/private\/etc\/apache2\/extra\/httpd-userdir.conf/s/^#*//g' /etc/apache2/httpd.conf ; sed -i '' '/Include \/private\/etc\/apache2\/users\/\*.conf/s/^#*//g' /etc/apache2/extra/httpd-userdir.conf ; apachectl start"
elif (( $(echo "${OSTYPE:6} > 10" | bc -l) ))
then
mkdir ~/Sites ; sudo bash -c "printf '<Directory \"/Users/`whoami`/Sites/\">\n\tAddLanguage en .en\n\tAllowOverride All\n\tOptions Indexes MultiViews Follow
@Wowfunhappy
Wowfunhappy / patches.diff
Created August 24, 2020 20:18
Docker Machine + VMWare Fusion on Mavericks
1. Reset Macports tree to revision 9bbc6e46bc525b714dbea0d10970f29f18bcc7de
2. sudo port install Docker
3. Edit Docker-Machine port file, change version to 0.16.2 and update checksums and size to match, taking from https://github.com/macports/macports-ports/blob/c534c086278121e3f558490cb1baeb011162c93d/devel/docker-machine/Portfile
4. Add in below diff patches. Removes the error checking that actually just ends up breaking everything, see: https://github.com/docker/machine/issues/4479#issuecomment-464355478. Also disables suspend in vmware because that screws up stuff.
5. Install docker-machine, save build docker-machine and docker binaries.