Skip to content

Instantly share code, notes, and snippets.

@andsve
andsve / app_delegate.c
Created January 17, 2019 13:36
A simple implementation of a NSApplicationDelegate and two methods (openFile:, openFiles:) in pure C.
/*
app_delegate.c
1. Compile and link with:
$ clang -g -o AppInC app_delegate.c -lobjc -framework Foundation -framework AppKit -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
2. Create a Info.plist with:
[[
<?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">
@fnky
fnky / ANSI.md
Last active May 17, 2024 09:13
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@CanTheAlmighty
CanTheAlmighty / DisplayLink.swift
Last active March 10, 2024 08:43
DisplayLink for OSX