Skip to content

Instantly share code, notes, and snippets.

View tonyarnold's full-sized avatar

Tony Arnold tonyarnold

View GitHub Profile
//
// Created by Tony Arnold on 4/03/2014.
// Copyright (c) 2014 The CocoaBots. All rights reserved.
//
#import "NSView+TCBAdditions.h"
#import <objc/runtime.h>
@implementation NSView (TCBAdditions)
#if DEBUG
/**
Toggles assertion of Core Data managed object contexts. Only available when DEBUG is defined.
When enabled, your application will throw an exception when accessing or modifying entities in a context other than their own.
*/
void TCBToggleAssertingContextQueues();
#endif
#if DEBUG
/**
Toggles assertion of Core Data managed object contexts. Only available when DEBUG is defined.
When enabled, your application will throw an exception when accessing or modifying entities in a context other than their own.
*/
void TCBToggleAssertingContextQueues();
#endif
Pod::Spec.new do |s|
s.name = 'INAppStoreWindow'
s.version = '1.4dev'
s.summary = 'Mac App Store style NSWindow subclass.'
s.homepage = 'https://github.com/indragiek/INAppStoreWindow'
s.author = { 'Indragie Karunaratne' => '[email protected]' }
s.source = { :git => 'https://github.com/indragiek/INAppStoreWindow.git', :branch => 'master' } #:tag => "v#{s.version}" }
s.platform = :osx
s.requires_arc = true
s.license = { :type => 'BSD', :text => 'INAppStoreWindow is licensed under the BSD license.'}
// NSManagedObjectContext+DebugSwizzling.h
#import <CoreData/CoreData.h>
#if DEBUG
/**
* Toggles debugging of Core Data managed object contexts.
*
* When enabled, will fire NSLogs in the following cases:
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "2.3"
s.summary = "A framework for composing and transforming streams of values."
s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source"
s.author = { "Josh Abernathy" => "[email protected]" }
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :tag => "v#{s.version}" }
s.license = 'MIT'
s.description = "ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming. It provides APIs for composing and transforming streams of values."
@tonyarnold
tonyarnold / Gemfile
Created March 26, 2014 11:29
Gemfile that installs jekyll project dependencies and uses a patched version of gsl for Mac OS X Mavericks
source 'https://rubygems.org'
gem 'jekyll'
gem 'sass'
gem 'kramdown'
gem 'rouge'
gem 'rake'
gem 'narray', :git => "https://github.com/tonyarnold/narray"
gem 'gsl', :git => "https://github.com/tonyarnold/rb-gsl"
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed -r
@tonyarnold
tonyarnold / import_all.rb
Created March 24, 2014 03:02
Really rough script to copy GitHub issues to GitLab, including scaffolding users with the correct name/username, but dummy emails. Prepare to be spammed by notifications. Current issues include comments not being associated with their proper owner, pull requests aren't properly transferred and wiki page imports have not been tested.
# Community contributed script to import from GitHub to GitLab
# It imports repositories, issues and the wiki's.
# This script is not maintained, please send merge requests to improve it, do not file bugs.
# The issue import might concatenate all comments of an issue into one, if so feel free to fix this.
require 'bundler/setup'
require 'octokit'
require 'optparse'
require 'git'
require 'gitlab'
//
// Created by Tony Arnold on 22/03/2014.
// Copyright (c) 2014 The CocoaBots. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSArray (CocoaBotsAdditions)
- (NSSet *)tcb_objectsPassingTest:(BOOL (^)(id obj, BOOL *stop))predicate;