Skip to content

Instantly share code, notes, and snippets.

git diff --stat HEAD^ |vim -
gf
@pebble8888
pebble8888 / gist:deab8fc5b1cdff022b92
Created November 5, 2014 08:26
OpenAL phone call
static BOOL shouldHandleEndInterruptionOnBecomingActive = NO;
+ (void)endInterruption
{
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
[self innerHandleEndInterruption];
} else {
shouldHandleEndInterruptionOnBecomingActive = YES;
}
}
@pebble8888
pebble8888 / gist:a65c5914661f0672c0a7
Created November 19, 2014 00:54
DVTPluginCompatibilityUUID
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
x-xcode-module://UIKit.UIViewController?language=Xcode.SourceCodeLanguage.Swift&source-header=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h&swift-sdk=iphoneos9.0&swift-target=arm64-apple-ios9.0
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): self.cursorMode shoud be CURSOR_MODE_COMMAND
Process: Xcode [39406]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.2.1 (9548.1)
Build Info: IDEFrameworks-9548001000000000~2
App Item ID: 497799835
App External ID: 816142004
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [39406]
NSClipView
var drawsBackground: Bool
OBJECTIVE-C
@property BOOL drawsBackground
Discussion
If your NSClipView is enclosed in an NSScrollView,
you should set the drawsBackground property on the NSScrollView.
NSClipViewがNSScrollViewに埋め込まれている場合、NSScrollViewのdrawsBackgroundプロパティをセットするべきである。
int var1;
#if 0
int var2;
#endif
int var3;
#if 0
int var4;
#endif
#if 0
#include <stdio.h>
class ThreadUtility
{
public:
static std::string thread_id_string(std::thread& th) {
std::stringstream ss;
ss << th.get_id();
return ss.str();
}
close Xcode
$ cd ~/Library/Application\ Support/Developer/Shared/Xcode
rename directory Plug-ins to Plug-ins-foo
open Xcode
close Xcode
rename back Plug-ins-foo to Plug-ins
open Xcode