Skip to content

Instantly share code, notes, and snippets.

1.0 (7B85)
1.5 (7K571)
2.2.1 (8G1165)
2.3 (8M1780)
2.4 (8K1079)
2.4.1 (8M1910)
2.5 (8M2558)
3.0 (9A581)
3.1 (9M2199)
3.1.1 (9M2517)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>FiraCode-Bold - 18.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@Arclite
Arclite / devcontainer.json
Created November 20, 2022 22:51
Swift Dev Container
{
"name": "Swift",
"image": "swift:5.7",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
"onCreateCommand": "apt update && apt install -y libpython3-dev python3-lldb && ln -s /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/* /usr/lib/python3/dist-packages/lldb/",
"settings": {
@Arclite
Arclite / HiddenTitlebar.swift
Created November 19, 2022 04:29
Creating a transparent window in SwiftUI
// requires Introspect package: https://github.com/siteline/SwiftUI-Introspect
extension View {
private func introspectView(customize: @escaping (NSView) -> ()) -> some View {
return inject(AppKitIntrospectionView(
selector: { introspectionView in
guard let viewHost = Introspect.findViewHost(from: introspectionView) else {
return nil
}
return viewHost
@Arclite
Arclite / .gitlab-ci.yml
Last active August 12, 2018 19:05
Companion files for "Adding GitLab CI Support"
stages:
- test
- beta
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
test:
dependencies: []
stage: test
artifacts:

Keybase proof

I hereby claim:

  • I am arclite on github.
  • I am geoffpado (https://keybase.io/geoffpado) on keybase.
  • I have a public key ASBWEhvlnvbNkgNIUWiZRRlfan1ZMBqm6ddXcTTN1Sm3RQo

To claim this, I am signing this object:

processor 6502
include "vcs.h"
include "macro.h"
SEG
ORG $F000
Reset
; Clear RAM and all TIA registers
ldx #0
@Arclite
Arclite / gist:1504080
Created December 21, 2011 01:10
Screenshot a view in iOS
UIGraphicsBeginImageContext([myView bounds].size);
UIGraphicsPushContext(UIGraphicsGetCurrentContext());
[[myView layer] renderInContext:UIGraphicsGetCurrentContext()];
UIGraphicsPopContext();
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
NSLog(@"screenshot data: %@", UIImagePNGRepresentation(screenshot)); //dumps a bunch of hex, use Hex Fiend to view it.
UIGraphicsEndImageContext();
@Arclite
Arclite / Unarchive Error
Created December 22, 2010 03:58
I get messages like this in my console log whenever I try to unarchive a zip, and it fails with error -1.
12/21/10 9:57:36 PM [0x0-0x19b19b].com.apple.archiveutility[74260] ditto: /private/var/folders/cr/crVlBbuaGh09fOuYWPdGNU+++TI/Cleanup At Startup/.BAH.cYheQ/LD19_ChadyG.app/Contents/Frameworks/Engine.framework/Versions/A/Frameworks/Gosu.framework/Versions/A/Headers/Platform.hpp: File exists
12/21/10 9:57:36 PM [0x0-0x19b19b].com.apple.archiveutility[74260] ditto: /private/var/folders/cr/crVlBbuaGh09fOuYWPdGNU+++TI/Cleanup At Startup/.BAH.cYheQ/LD19_ChadyG.app/Contents/Resources/Images/bystander2.png: File exists
12/21/10 9:57:36 PM [0x0-0x19b19b].com.apple.archiveutility[74260] ditto: /private/var/folders/cr/crVlBbuaGh09fOuYWPdGNU+++TI/Cleanup At Startup/.BAH.cYheQ/LD19_ChadyG.app/Contents/Resources/Images/bystander_down.png: File exists
//For classes introduced in iPhone OS 3.2, you can use the NSClassFromString function to see if the class is defined. If the function returns a non-nil value, you may use the class. For example:
Class splitVCClass = NSClassFromString(@"UISplitViewController");
if (splitVCClass)
{
UISplitViewController* mySplitViewController = [[splitVCClass alloc] init];
// Configure the split view controller.
}