Skip to content

Instantly share code, notes, and snippets.

View tjw's full-sized avatar

Timothy J. Wood tjw

View GitHub Profile
@tjw
tjw / DispatchWriteSource.m
Created March 28, 2018 22:23
A dispatch write source that is connected to a UNIX domain socket with a full write buffer will fire forever, instead of waiting to fire until there is room in the buffer to write more data.
//
// main.m
// DispatchWriteSource
//
// Created by Timothy J. Wood on 3/27/18.
// Copyright © 2018 The Omni Group. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <unistd.h>
@tjw
tjw / OmniOutliner Transcribe WWDC Notes.applescript
Created June 6, 2019 16:57
OmniOutliner Transcribe WWDC Notes
(*
With a QuickTime file open QuickTime Player, and an OmniOutliner file open that matches the title below, if this is invoked:
- If the QT file is playing, it is paused and the current playback speed is recorded (use option-click on the fast forward button to increase playing speed in QuickTime Player)
- If there is not a row starting with the right session number, one is created at the top level (with a link back to the QT file)
- A new row is added with the current time code and the insertion point to the right of it and OmniOutliner is activated.
- Otherwise, playing in the QT file is resumed a couple seconds before the point at which it was paused, with the playback rate restored, and QT is activated
- Setup:
@tjw
tjw / OmniOutliner Transcribe WWDC Notes.applescript
Last active June 8, 2021 20:16
Transscribe WWDC video notes into OmniOutliner
(*
With a QuickTime file open QuickTime Player, and an OmniOutliner file open that matches the title below, if this is invoked:
- If the QT file is playing, it is paused and the current playback speed is recorded (use option-click on the fast forward button to increase playing speed in QuickTime Player)
- If there is not a row starting with the right session number, one is created at the top level (with a link back to the QT file)
- A new row is added with the current time code and the insertion point to the right of it and OmniOutliner is activated.
- Otherwise, playing in the QT file is resumed a couple seconds before the point at which it was paused, with the playback rate restored, and QT is activated
- Setup: