Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Sardone andrewsardone

View GitHub Profile
View garageband10.md

Thoughts and complaints on GarageBand 10

I just recently started using GarageBand 10 for the first time since its October 2013 release. Up until now I had been doing occasional work in GarageBand 6.0.5, from the iLife ‘11 suite (also known as GarageBand 11, which isn’t confusing at all).

I decided it was time to get on the “newer is better” bandwagon and [start a new project][coptp] in GarageBand 10. Historically GarageBand has been one of my favorite Apple apps because I’ve used it a lot for some really fun tasks (read: making songs with my high school and college bands). Because of this, I was eager to try GarageBand 10 for superficial reasons (cleaner look, retina assets FTW), but thinking that it’s previously been a relatively strong app that they’ve probably only made it better.

Boy, was I wrong.

Disclaimer

@andrewsardone
andrewsardone / gist:9993488
Last active Aug 29, 2015
Desired assertion for testing that KVO info isn't leaked when system-under-test is dealloc'd
View gist:9993488
@interface FooKVOTests : SenTestCase
@end
@implementation FooKVOTests
#pragma mark Observation info leak regression
- (void)test_observation_info_is_not_leaked
{
Foo *__weak foo = [Foo new]; // dealloc foo immediately
View keybase.md

Keybase proof

I hereby claim:

  • I am andrewsardone on github.
  • I am andrewsardone (https://keybase.io/andrewsardone) on keybase.
  • I have a public key whose fingerprint is 7138 F183 6AAB D05C 361F 4FB6 EBDC 1C42 BA58 1B68

To claim this, I am signing this object:

@andrewsardone
andrewsardone / imperative.m
Last active Aug 29, 2015
Animating UILabel
View imperative.m
static void *kContext = &kContext;
- (void)viewDidLoad
{
[super viewDidLoad];
[self.viewModel addObserver:self
forKeyPath:@"instructionText"
options:NSKeyValueObservingOptionInitial
context:kContext];
View extended-tweet-on-reactive-cocoa-and-delegate-pattern.md

Here's a quick attempt at trying to build off of some quick tweets:

@cdzombak @vitalekj @a_j_r nice! Another underlying point is that the delegate example is easy. I've seen experienced devs struggle w/ it.

— Andrew Sardone (@andrewa2) February 15, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

@cdzombak @vitalekj @a_j_r I think many devs' love of callbacks helps demonstrate this

— Andrew Sardone (@andrewa2) February 15, 2014
<script async
@andrewsardone
andrewsardone / bookmarklet.js
Created Dec 17, 2013
Tweetbot bookmarklet. I'm sure other people have better, more robust ones, but this bookmarklet works for me.
View bookmarklet.js
javascript:(function()%7Bwindow.open(location.href.replace(%2Fhttps%3A%5C%2F%5C%2F(mobile.)%3Ftwitter.com%5C%2F%2F%2C%20%22tweetbot%3A%2F%2F%22).replace(%22statuses%22%2C%20%22status%22)%2C%20%22_self%22)%7D)()
View faraday_stub_spec.rb
require 'rubygems'
require 'rspec'
require 'faraday'
describe Faraday do
it "stubs HTTP responses" do
conn = Faraday.new do |f|
f.adapter :test do |stub|
stub.get '/example' do
[200, {}, 'hi world']
@andrewsardone
andrewsardone / gist:7130116
Last active Dec 26, 2015
Using a compound statement enclosed in parentheses to enclose scope of a local UIView that's added to your view controller's view hierarchy and held as a weak reference. In response to http://ashfurrow.com/blog/weakstrong-dance
View gist:7130116
#import "ViewController.h"
@interface ViewController ()
@property (nonatomic, weak) UILabel *label;
@end
@implementation ViewController
@andrewsardone
andrewsardone / gist:6969549
Last active Dec 25, 2015
Elixir doctests
View gist:6969549
defmodule AndrewEnum do
@moduledoc """
A reimplementation of the standard `Enum` module.
"""
@doc """
Invokes the given `fun` for each item in the `collection`.
Returns `:ok`.
@andrewsardone
andrewsardone / gist:6458455
Created Sep 6, 2013
script/sort-xcodeproj for handy Xcode project organization
View gist:6458455
#!/bin/bash
#
# Usage: script/sort-xcodeproj to sort all root-level Xcode projects.
# This helps keep the Xcode project layout neat and consistent while
# aiding in the prevention of [merge conflicts][mc].
#
# [mc]: http://danieltull.co.uk/blog/2013/09/05/easier-merging-of-xcode-project-files/
SCRIPT_DIR=$(dirname "$0")
cd "$SCRIPT_DIR/.."