This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to disable the iOS Simulator app from showing the "Do you want the application xxxx to accept incoming network connections?" pop-up every time the app is run | |
echo "> Enter password to temporarily shut firewall off" | |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off | |
echo "> Add Xcode as a firewall exception" | |
/usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/Xcode.app/Contents/MacOS/Xcode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A class that can be part of a tabbed navigational interface (expected to be a `UIViewController` but can also be a | |
* coordinator that proxies through to an underlying controller). | |
*/ | |
public protocol TabComponent { | |
/// The tab metadata | |
var tabItem: TabItem { get } | |
var viewController: UIViewController { get } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation NSTableView (Reordering) | |
- (void) moveRowsWithOldObjects:(NSArray*)oldObjects newObjects:(NSArray*)newObjects | |
{ | |
NSMutableArray* oldSortedArray = [oldObjects mutableCopy]; | |
NSArray* newSortedArray = newObjects; | |
[self beginUpdates]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface NSFileManager (ApplicationList) | |
-(NSArray *)applicationList; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.ansibleworks.com/docs/modules.html#digital-ocean | |
# Create a new Droplet | |
# Will return the droplet details including the droplet id (used for idempotence) | |
- name: launch DO droplet | |
hosts: local | |
gather_facts: False | |
tasks: | |
- name: pwd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In an NSSplitView subclass | |
- (void)drawDividerInRect:(NSRect)rect | |
{ | |
[super drawDividerInRect:NSIntegralRect(rect)]; | |
} | |
// In NSSplitViewDelegate implementation | |
- (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)dividerIndex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface Something : NSObject | |
+(Something *)somethingSingleton; | |
@end | |
@implementation Something | |
+(Something *)somethingSingleton { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// RespondersView.h | |
// RespondersView | |
// | |
// Created by Panupan Sriautharawong on 9/13/11. | |
// Copyright 2011 Panupan.com. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> |