Skip to content

Instantly share code, notes, and snippets.


Kevin Meaney SheffieldKevin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am SheffieldKevin on github.
  • I am ktam ( on keybase.
  • I have a public key whose fingerprint is D09A 1368 02CD 66C0 454C 42A8 595C 9934 19FB CBF9

To claim this, I am signing this object:

SheffieldKevin / MIAVCreateImageOfCompositionMap.m
Created Mar 8, 2015
This is a hack grab of code from Apple's AV Composition Debug Viewer application to generate a CGImage. Works on OS X and iOS. Doesn't draw text.
View MIAVCreateImageOfCompositionMap.m
// MIAVCreateImageOfCompositionMap.m
// MovingImagesFramework
// Created by Kevin Meaney on 08/03/2015.
// Lifted from Apple's Composition Debug Viewer application.
@import Foundation;
@import AVFoundation;
SheffieldKevin / main.m
Created Feb 20, 2015
bigears. Drawing rotated and positioned text within a path using CoreText (OS X command line, intended to be bug report for apple but highlighted a bug of mine)
View main.m
// main.m
// bigears
// Created by Kevin Meaney on 18/02/2015.
// Copyright (c) 2015 Kevin Meaney. All rights reserved.
#import <Foundation/Foundation.h>
SheffieldKevin / MICMSampleBuffer.h
Last active Apr 16, 2018
Video Sample buffer accessor/iterator using AVFoundation
View MICMSampleBuffer.h
// MICMSampleBuffer.h
// MovieMaker
// Created by Kevin Meaney on 02/01/2015.
// Copyright (c) 2015 MIT License. All rights reserved.
@import Foundation;
@import AVFoundation;
@interface MICMSampleBuffer : NSObject <NSCopying>
SheffieldKevin / compareimages.swift
Last active Nov 19, 2020
A couple of swift functions for comparing two CGImage using CIImage in OS X
View compareimages.swift
@brief Returns true if images have same meta. Width, Height, bit depth.
@discussion Assumes images are non null.
func doImagesHaveSameMeta(#image1:CGImage, #image2:CGImage) -> Bool {
if CGImageGetWidth(image1) != CGImageGetWidth(image2) {
return false
if CGImageGetHeight(image1) != CGImageGetHeight(image2) {
SheffieldKevin / movietracks.swift
Last active Nov 7, 2020
Playing with movie tracks using AVFoundation in Swift (command line version)
View movietracks.swift
#!/usr/bin/env swift
import Foundation
import AVFoundation
if Process.arguments.count != 2 {
println("The first and only argument should be a full path to a movie or music file.")
SheffieldKevin / movietransitions.swift
Last active Apr 19, 2021
Make a movie with transitions with AVFoundation and swift
View movietransitions.swift
// main.swift
// mutablecomposition
// Created by Kevin Meaney on 24/08/2015.
// Copyright (c) 2015 Kevin Meaney. All rights reserved.
import Foundation
SheffieldKevin / CreateImageProtocol.h
Created Oct 17, 2014
Objective-C properties of protocols that take blocks/closures and accessing them in Swift
View CreateImageProtocol.h
// CreateImageProtocol.h
// test
// Created by Kevin Meaney on 17/10/2014.
// Copyright (c) 2014 Kevin Meaney. All rights reserved.
#import <Foundation/Foundation.h>
SheffieldKevin / scaleandwatermark
Created Oct 12, 2014
ruby/applescript display select folder dialog script for Paul
View scaleandwatermark
#!/usr/bin/env ruby
# Scale and add a text water mark to images.
require 'moving_images'
include MovingImages
# The folder where the water marked images will be saved.
output_dir = "~/Desktop/watermarkedfiles"
SheffieldKevin / coda_runscript.rb
Last active Aug 29, 2015
Coda run the current document in ruby plugin script
View coda_runscript.rb
#!/usr/bin/env ruby
# This is the script code to run. It runs the script based on the file path to the script not text passed in.
# In Panic's "Coda Plug-in Creator" I've set the following options:
# Command is: Run Document
# Keyboard shortcut: Command-Option-R
# On Run: Save
# On Success: Nothing
# STDIN None
# STDOUT New Document