Skip to content

Instantly share code, notes, and snippets.

View manuyavuz's full-sized avatar

Muhammed Yavuz Nuzumlalı manuyavuz

View GitHub Profile
@alloy
alloy / build-settings.rb
Created April 28, 2020 14:43
Example of ways to introspect Xcode build settings
# gem install xcodeproj claide hashdiff
require 'xcodeproj'
require 'claide'
require 'pp'
argv = CLAide::ARGV.new(ARGV)
project_path = argv.shift_argument
target_name = argv.option("target")
target_type = argv.option("target-type", "PBXNativeTarget")
@ddunbar
ddunbar / xcbuild-debugging-tricks.md
Last active April 13, 2024 15:41
Xcode new build system debugging tricks

New Build System Tricks

Command Line

alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole  # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
from graphviz import Digraph
import torch
from torch.autograd import Variable, Function
def iter_graph(root, callback):
queue = [root]
seen = set()
while queue:
fn = queue.pop()
if fn in seen:
@AliSoftware
AliSoftware / Generics-Macros.h
Last active December 11, 2020 17:18
ObjCGenerics
// Allow to use generics even if not supported yet
#if __has_feature(objc_generics)
#define NSArrayOf(x) NSArray<x>
#define NSMutableArrayOf(x) NSMutableArray<x>
#define NSDictionaryOf(x,y) NSDictionary<x, y>
#define NSMutableDictionaryOf(x, y) NSMutableDictionary<x, y>
#define NSSetOf(x) NSSet<x>
#define NSMutableSetOf(x) NSMutableSet<x>
#else
#define NSArrayOf(x) NSArray