Skip to content

Instantly share code, notes, and snippets.

Avatar

zhuowei

View GitHub Profile
View printedid.m
@import Darwin;
@import Foundation;
@import IOKit;
typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator);
extern IOReturn IOAVServiceCopyEDID(IOAVServiceRef service, CFDataRef* x2);
// Hopefully prints EDID of the external monitor on an Apple Silicon device??????
// clang -fmodules -o printedid printedid.m
View IOAVService_Private.h
#pragma once
@import Darwin;
@import Foundation;
typedef mach_port_t io_object_t;
typedef io_object_t io_service_t;
typedef CFTypeRef IOAVServiceRef;
typedef CFTypeRef IOAVDeviceRef;
typedef kern_return_t IOReturn;
// allocator: must be kCFAllocatorDefault
// Note that this defaults to grabbing the external IOAVService:
View login.txt
POST /api/start_phone_number_auth HTTP/1.1
Host: zhuowei-clubhouse.ngrok.io
Accept: application/json
CH-UserID: (null)
CH-Languages: en-US
CH-Locale: en_US
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US;q=1
CH-AppBuild: 269
CH-AppVersion: 0.1.25
View alltheendpoints.txt
record_action_trails
start_phone_number_auth
call_phone_number_auth
resend_phone_number_auth
complete_phone_number_auth
check_waitlist_status
get_release_notes
get_all_topics
get_topic
get_clubs_for_topic
View mce_urls.txt
/adventures/scrolls/{itemId}
/adventures/scrolls
/boosts/minifigs/{productId}/{id}/activate
/boosts/potions/{itemId}/activate
/boosts/{instanceId}/deactivate
/boosts/players/{playerId}/latest
/boosts/{instanceId}
/buildplates/shared/{id}
/buildplates/{id}/file
/buildplates
@zhuowei
zhuowei / build-xnu-6153.141.1.sh
Last active Jan 31, 2021 — forked from knightsc/build-xnu-6153.11.26.sh
A script to build XNU version xnu-6153.141.1 (macOS Catalina 10.15.6), based on Scott Knight's script
View build-xnu-6153.141.1.sh
#! /bin/bash
# build-xnu-6153.141.1.sh
# tested with Xcode 11.7 on macOS 11
# Changes:
# update to 10.15.6's kernel
# specify an Xcode
# force host OS version to 10.15 so Xcode's clang doesn't complain
#
# based on
#
View otool_metal_lib.dylib
output_metal.dylib (architecture cputype (16777235) cpusubtype (290)):
Load command 0
cmd LC_UUID
cmdsize 24
uuid A35935E6-3E43-C4AE-C3A6-652B12204A21
Load command 1
cmd LC_SEGMENT_64
cmdsize 152
segname __TEXT
vmaddr 0x0000000100000000
@zhuowei
zhuowei / WDBSetWebSecurityEnabled.m
Created Sep 1, 2020
Disable same-origin policy on iOS WKWebView with private API.
View WDBSetWebSecurityEnabled.m
// Allows disabling Same-Origin Policy on iOS WKWebView.
// Tested on iOS 12.4.
// Uses private API; obviously can't be used on app store.
@import WebKit;
@import ObjectiveC;
void WKPreferencesSetWebSecurityEnabled(id, bool);
@interface WDBFakeWebKitPointer: NSObject
View bootingintolaunchd.txt
QEMU 5.0.92 monitor - type 'help' for more information
(qemu) kprintf initialized
Serial mode specified: 00000007
WARNING: Forcing uart driver to output synchronously.printf()s/IOLogs will impact kernel performance.
You are advised to avoid using 'drain_uart_sync' boot-arg.
initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000, d=00000000
initialize_screen: No video - forcing serial mode
pe_arm_init_interrupts: args: <ptr>
pe_arm_map_interrupt_controller: soc_phys: 0x200000000
pe_arm_map_interrupt_controller: found interrupt-controller
View bootlogalmostlaunchd.txt
QEMU 5.0.92 monitor - type 'help' for more information
(qemu) kprintf initialized
Serial mode specified: 00000007
WARNING: Forcing uart driver to output synchronously.printf()s/IOLogs will impact kernel performance.
You are advised to avoid using 'drain_uart_sync' boot-arg.
initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000, d=00000000
initialize_screen: No video - forcing serial mode
pe_arm_init_interrupts: args: <ptr>
pe_arm_map_interrupt_controller: soc_phys: 0x200000000
pe_arm_map_interrupt_controller: found interrupt-controller