Skip to content

Instantly share code, notes, and snippets.

View jdriscoll's full-sized avatar

Justin Driscoll jdriscoll

View GitHub Profile
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@kylesluder
kylesluder / AsyncAwait.swift
Last active May 15, 2020 06:01
A C#-style Async/Await implementation in Swift
// A much better version of C#-style Async/Await. It can return values!
import Cocoa
struct Await<T> {
// private
let group: dispatch_group_t
let getResult: () -> T
// public
func await() -> T { return getResult() }
@mattt
mattt / Emoji.plist
Created December 30, 2013 17:26
Emoji grouped by category, as extracted by by private APIs on the iPhone simulator, via [Cédric Luthi](https://github.com/0xced).
<?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>People</key>
<array>
<string>😄</string>
<string>😃</string>
<string>😀</string>
<string>😊</string>
@lisamelton
lisamelton / detect-crop.sh
Last active November 28, 2018 02:39
Detect crop values for video file to use with `mplayer` and `transcode-video.sh` (a wrapper script for `HandBrakeCLI`).
#!/bin/bash
#
# detect-crop.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 3.3 of January 22, 2015
@phildow
phildow / CLLocation+EXIFGPS.h
Last active December 2, 2019 02:37
Category to create GPS metadata dictionary from CLLocation and CLHeading for writing to EXIF data in images.
#import <CoreLocation/CoreLocation.h>
#import <ImageIO/ImageIO.h>
@interface CLLocation (EXIFGPS)
- (NSDictionary*) EXIFMetadataWithHeading:(CLHeading*)heading;
@end
@interface NSDate (EXIFGPS)