Skip to content

Instantly share code, notes, and snippets.

@michaeltyson
michaeltyson / SlackToThings.php
Last active November 9, 2021 21:37
Slack app PHP script to create todo item in Things
<?php
// Super quick-and-dirty php script to create a todo item in Things wheneven you save/star an item in Slack.
// Put this on webserver, and create a Slack app with a "star added" event subscription. See also
// https://nordicapis.com/a-beginners-guide-to-building-a-slack-bot-in-php/
// Stuff to fill in; get history key via:
// curl -H 'Authorization: Password YourPasswordHere' -v https://cloud.culturedcode.com/version/1/account/Your@Email.Here/own-history-key
$thingsHistoryKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // Required
@michaeltyson
michaeltyson / check-cycles.sh
Created May 25, 2021 03:13
Xcode Build Script phase to check for retain cycles within blocks (self capture)
#!/bin/sh
EXCEPTIONS=(
', '
'animations:'
'animateChanges:'
'changes:'
'completion:'
'completionBlock:'
'CompletionBlock:'
'performAnimations:'
@michaeltyson
michaeltyson / TheAmazingAudioEngine.podspec
Created June 13, 2016 03:55
TheAmazingAudioEngine.podspec
Pod::Spec.new do |s|
s.name = "TheAmazingAudioEngine"
s.version = "1.5.7"
s.summary = "Core Audio, Cordially: A sophisticated framework for iOS audio applications, built so you don't have to."
s.homepage = "http://theamazingaudioengine.com"
s.license = 'zlib'
s.author = { "Michael Tyson" => "michael@atastypixel.com" }
s.source = { :git => "https://github.com/TheAmazingAudioEngine/TheAmazingAudioEngine.git", :tag => "1.5.7" }
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
@michaeltyson
michaeltyson / update_itmsp_screenshots.php
Last active August 29, 2015 14:17
iTunes Connect screenshot upload script
#!/usr/bin/php
<?php
/*
Usage (at your own risk!):
1. Work on screenshots (try this Sketch template: http://bit.ly/1G9xstD)
2. Setup:
@michaeltyson
michaeltyson / test.py
Created March 2, 2014 06:31
Python + Gst + Cairo Overlay
#!/usr/bin/env python
import gi
import sys
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
import cairo
class Renderer():
OVERLAY_FRAME_WIDTH = 320
@michaeltyson
michaeltyson / gist:1817010
Created February 13, 2012 13:33
Lock-free messaging stuff for communication with realtime Core Audio thread
/*!
* Message handler fuction
*/
typedef long (*TPAudioControllerMessageHandler) (TPAudioController *THIS, long parameter1, long parameter2, long parameter3, void *ioOpaquePtr);
/*!
* Message
*/
typedef struct _message_t {
@michaeltyson
michaeltyson / gist:1815496
Created February 13, 2012 09:38
Core audio realtime thread non-locking sync/message passing
// Some types:
typedef struct _message_t {
int action;
int kind;
long parameter1;
long parameter2;
long parameter3;
void *response_ptr;
void (^response_block)(struct _message_t message, long response);