Skip to content

Instantly share code, notes, and snippets.

@githhhh
githhhh / ForceEnablingXcodeLLM.md
Created June 17, 2024 08:58 — forked from unixzii/ForceEnablingXcodeLLM.md
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

@githhhh
githhhh / ForceEnablingXcodeLLM.md
Created June 17, 2024 08:58 — forked from unixzii/ForceEnablingXcodeLLM.md
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

@githhhh
githhhh / CATransactionObserving.mm
Created June 12, 2023 06:23 — forked from Adlai-Holler/CATransactionObserving.mm
How to observe CoreAnimation transaction commits as activities. Covers run-loop commits and UIKit-direct-flush commits, but not CADisplayLink scroll view commits.
/**
* Don't use this in production!
*
* Screenshot of it working: https://user-images.githubusercontent.com/2466893/27601666-f65159f0-5b24-11e7-969d-fe86103c21de.png
*/
/**
* This is real, private CA API. Valid as of iOS 10.
*/
typedef enum {
@githhhh
githhhh / Gemfile
Created November 21, 2022 07:10 — forked from dideler/Gemfile
Example of building a Directed Acyclic Graph (DAG) for tasks that depend on each others
source 'http://rubygems.org'
gem 'plexus'
gem 'gratr' # dependency of plexus to visualize graphs
@githhhh
githhhh / Gemfile
Created November 21, 2022 07:10 — forked from dideler/Gemfile
Example of building a Directed Acyclic Graph (DAG) for tasks that depend on each others
source 'http://rubygems.org'
gem 'plexus'
gem 'gratr' # dependency of plexus to visualize graphs
@githhhh
githhhh / array.m
Created February 18, 2016 01:55 — forked from markd2/array.m
On-demand Objective-C message tracing
#import <Foundation/Foundation.h>
// clang -g -fobjc-arc -framework Foundation -o array array.m
void observeObject (id objectToWatch) {
// Just a stub to give DTrace something to hook in to.
}
int main (void) {
@autoreleasepool {
@githhhh
githhhh / ryan-objc.cfg
Created January 7, 2016 03:01 — forked from ryanmaxwell/ryan-objc.cfg
Objective-C Uncrustify Config
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment

OCLint integration with Xcode

1. Integration

  • Add a new Target of kind Aggregate, name it OCLint
  • Under Builde Phases, add a new Run Script Phase
  • Paste the script

2. Usage

  • Select target OCLint
  • Build the target (press ⌘+B)