This file contains 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
// ONLY WORKS WITH ONE SECTION!! | |
- (BOOL) performFetchAndUpdateTableView:(NSError **)error | |
{ | |
NSArray *objectsBefore = [self.fetchedResultsController.fetchedObjects retain]; | |
BOOL result = [self.fetchedResultsController performFetch:error]; | |
if (result) { | |
NSArray *objectsAfter = self.fetchedResultsController.fetchedObjects; | |
This file contains 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
do shell script "system_profiler SPHardwareDataType | grep 'Hardware UUID:'" | |
set uuid to text ((offset of ":" in result) + 2) thru -1 of result | |
tell application "Mail" | |
set theNewMessage to make new outgoing message with properties {subject:"Mac App Beta - My UUID", content:uuid, visible:true} | |
tell theNewMessage | |
make new to recipient at end of to recipients with properties {address:"[email protected]"} | |
end tell | |
end tell |
This file contains 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
======================== | |
ASL is here to serve you | |
> | |
Jan 14 17:31:24 unknown configd[45] <Error>: WiFi:[348251484.774721]: bootstrap_look_up of WiFiManager server failed | |
Jan 14 17:31:24 unknown kernel[0] <Debug>: AppleBCMWLANChipManager::withBus(): BCM4329 revision B1 | |
Jan 14 17:31:24 unknown kernel[0] <Debug>: AppleMultitouchZ2SPI: downloaded 47160 bytes of firmware data ("0x0146.bin") in 154ms. | |
Jan 14 17:31:24 unknown kernel[0] <Debug>: AppleBCMWLANChipManagerSdio4329::downloadFirmware(): start | |
Jan 14 17:31:24 unknown kernel[0] <Debug>: Loading syscfg. |
This file contains 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
NSDate *CBCBDateFromISOString(NSString *iso) | |
{ | |
struct tm tm; | |
time_t t; | |
if (iso.length == 10) { | |
strptime([iso cStringUsingEncoding:NSUTF8StringEncoding], "%Y-%m-%d", &tm); | |
tm.tm_isdst = -1; | |
tm.tm_sec = 0; |
This file contains 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
- (void) registerSyncManager | |
{ | |
if (self.applicationSyncManager) return; | |
TICDSLogVerbosity logVerbosity = [[NSUserDefaults standardUserDefaults] integerForKey:kIVTICDSLogVerbosity]; | |
[TICDSLog setVerbosity:logVerbosity]; | |
if (![self hasLocalDatabase]) { |
This file contains 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
-Wall | |
-Wno-deprecated-declarations | |
-Werror=incompatible-pointer-types | |
-Werror=arc-retain-cycles | |
-Werror=implicit-function-declaration | |
-Werror=return-type | |
-Werror=format | |
-Werror=mismatched-parameter-types | |
-Werror=tautological-constant-out-of-range-compare |
This file contains 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 NSWindow (JSTalk) | |
- (BOOL) storeWindowImageToFile:(NSString*)fileName | |
{ | |
CGWindowID windowID = (CGWindowID)[self windowNumber]; | |
CGWindowImageOption imageOptions = kCGWindowImageDefault; | |
CGWindowListOption singleWindowListOptions = kCGWindowListOptionIncludingWindow; | |
CGRect imageBounds = CGRectNull; | |
CGImageRef windowImage = CGWindowListCreateImage(imageBounds, singleWindowListOptions, windowID, imageOptions); |
This file contains 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
[UIView transitionWithView:nameLabel | |
duration:0.25 | |
options:UIViewAnimationOptionTransitionCrossDissolve | |
animations:^{ | |
[nameLabel setTextColor:textColor]; | |
} | |
completion:nil]; |
This file contains 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
-- Uses System Events' keystrokes to start a recording in SimCap.app | |
tell application "SimCap" | |
activate | |
delay 0.5 | |
tell application "System Events" | |
tell process "SimCap" | |
keystroke "r" using {command down} | |
end tell |
This file contains 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
-- Uses System Events' keystrokes to start a recording in SimCap.app | |
-- SimCap: http://www.jaml.co.uk/simcap/ | |
tell application "SimCap" | |
activate | |
tell application "System Events" | |
tell process "SimCap" | |
keystroke "r" using {command down} | |
delay 1.0 | |
keystroke "s" using {command down} |
OlderNewer