Skip to content

Instantly share code, notes, and snippets.

ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR
@neonichu
neonichu / DynamicFunctions.swift
Created October 7, 2014 21:50
Using dlopen / dlsym to call C functions from Swift
import Darwin
let handle = dlopen("/usr/lib/libc.dylib", RTLD_NOW)
let sym = dlsym(handle, "random")
let functionPointer = UnsafeMutablePointer<() -> CLong>(sym)
let result = functionPointer.memory()
println(result)
@mayoff
mayoff / !README.md
Last active August 14, 2023 15:09
Debugging Objective-C blocks in lldb

The attached lldb command pblock command lets you peek inside an Objective-C block. It tries to tell you where to find the source code for the block, and the values captured by the block when it was created.

Consider this example program:

#import <Foundation/Foundation.h>

@interface Foo: NSObject
@end

@implementation Foo

@kieranb662
kieranb662 / Pulse.md
Last active July 23, 2024 15:19
[Pulse ViewModifier] Pulse SwiftUI ViewModifier #SwiftUI #ViewModifier

Circle Pulse

@arturdev
arturdev / CGPoint+Math.swift
Created August 20, 2023 00:09
UIBezierPath+Superpowers
//
// CGPoint+Math.swift
//
// Created by Artur Mkrtchyan on 10/24/20.
//
import UIKit
public extension CGPoint {
func symmetryTo(point: CGPoint) -> CGPoint {