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
[ | |
{ | |
"name": "Apple Tools", | |
"key": "apple-tools", | |
"description": "Messages, Notes, Contacts, Email, Reminders", | |
"type": "local", | |
"command": "npx", | |
"args": [ | |
"-y", | |
"https://github.com/Dhravya/apple-mcp.git" |
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
408904042 |
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
/* | |
Copyright (C) 2015 Apple Inc. All Rights Reserved. | |
See LICENSE.txt for this sample’s licensing information | |
Abstract: | |
Defines a subclass of NSOperation that adjusts the color of a video file. | |
*/ | |
import AVFoundation | |
import Dispatch |
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
(pv -n $INPUT_DISK_IMAGE | dd of=/dev/$OUTPUT_DISK_ID bs=2m conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 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
Here is what you need to do to register your app for a custom URL scheme (for the example we will use a "myapp" scheme). | |
1) In your Info.plist, add a new entry for CFBundleURLTypes: <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>MyApp's URL</string> <key>CFBundleURLSchemes</key> <array> <string>myapp</string> </array> </dict> </array> | |
2) Somewhere in your application's startup code (e.g. init), add this code: - (void)registerMyApp { [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(getUrl:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; } | |
- (void)getUrl:(NSAppleEventDescriptor )event withReplyEvent:(NSAppleEventDescriptor )replyEvent { NSString url = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; // Now you can parse the URL and perform whatever action is needed } | |
Related Tidbits: |
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
// Developer/Library/Frameworks/SenTestingKit.framework/Headers/SenTestCaseRun.h | |
SENTEST_EXPORT NSString * const SenTestCaseDidStartNotification; | |
SENTEST_EXPORT NSString * const SenTestCaseDidStopNotification; | |
SENTEST_EXPORT NSString * const SenTestCaseDidFailNotification; | |
// Developer/Library/Frameworks/SenTestingKit.framework/Headers/SenTestDistributedNotifier.h | |
SENTEST_EXPORT NSString * const SenTestNotificationIdentifierKey; | |
// Developer/Library/Frameworks/SenTestingKit.framework/Headers/SenTestSuiteRun.h | |
SENTEST_EXPORT NSString * const SenTestSuiteDidStartNotification; |
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
let notificationCenter = NSNotificationCenter.defaultCenter() | |
notificationCenter.addObserver( | |
self, | |
selector: "textFieldTextChanged:", | |
name:UITextFieldTextDidChangeNotification, | |
object: nil | |
) | |
func textFieldTextChanged(sender : AnyObject) { | |
sendButton.enabled = messageField.text.utf16count > 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
CVImageBufferRef cvImage = CMSampleBufferGetImageBuffer(sampleBuffer); | |
CIImage *ciImage = [[CIImage alloc] initWithCVPixelBuffer:cvImage]; |
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
// | |
// NSArray+BinarySearch.h | |
// BinarySearch | |
// | |
// Created by Ole Begemann on 19.04.10. | |
// Copyright 2010 Ole Begemann. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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)configureCameraForHighestFrameRate:(AVCaptureDevice *)device | |
{ | |
AVCaptureDeviceFormat *bestFormat = nil; | |
AVFrameRateRange *bestFrameRateRange = nil; | |
for ( AVCaptureDeviceFormat *format in [device formats] ) { | |
for ( AVFrameRateRange *range in format.videoSupportedFrameRateRanges ) { | |
if ( range.maxFrameRate > bestFrameRateRange.maxFrameRate ) { | |
bestFormat = format; | |
bestFrameRateRange = range; | |
} |
NewerOlder