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)loadDefaultSettings | |
{ | |
NSMutableDictionary *defaults = [NSMutableDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default-Settings" ofType:@"plist"]]; | |
// other setup... | |
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithDictionary:defaults]]; | |
} | |
- (void)resetDefaultSettings |
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
// | |
// NSEvent+MouseClamped.h | |
// xScope | |
// | |
// Created by Craig Hockenberry on 7/25/12. | |
// Copyright (c) 2012 The Iconfactory. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.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
// Names: HEAVY BLACK HEART <space> EXTRATERRESTRIAL ALIEN <space> FIRE <space> PILE OF POO | |
// Unicode: U+2764 U+1F47D U+1F525 U+1F4A9 | |
// UTF-8 E2 9D A4 F0 9F 91 BD F0 9F 94 A5 F0 9F 92 A9 | |
> var str = '❤ 👽 🔥 💩' | |
> str | |
'❤ 👽 🔥 💩' | |
undefined | |
> var buf = new Buffer(str, 'utf8') |
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
> var buf_ucs2 = new Buffer([0x35,0xD8,0x9c,0xDC]) | |
undefined | |
> buf_ucs2.toString('ucs2') | |
'𝒜' | |
> var str = buf_ucs2.toString('ucs2') | |
undefined | |
> str | |
'𝒜' | |
> var buf_utf8 = new Buffer(str, 'utf8') | |
undefined |
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
To: Phil Schiller <[email protected]> | |
Subject: Dev Center downtime | |
Dear Phil, | |
As I'm sure you're aware, the Mac and iOS Dev Centers have been down for more than a day. This means developers can't: | |
• Discuss issues in the forums | |
• Read iOS7 and Mavericks documentation | |
• Watch WWDC videos |
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
// | |
// NSFont+SystemFont.h | |
// xScope | |
// | |
// Created by Craig Hockenberry on 4/17/14. | |
// | |
// Thanks to http://nshipster.com/method-swizzling/ | |
#import <Cocoa/Cocoa.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
1) Create a script named '~/bin/xscope': | |
#!/bin/sh | |
parameter="" | |
if [ -z "$1" ]; then | |
parameter=`cat /dev/stdin` | |
else | |
parameter="$1" | |
fi |
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
#!/bin/sh | |
find=`find /Applications /Applications/Utilities -maxdepth 2 -name '*.app' -exec echo \{\} \;` | |
#echo $find | |
IFS=$'\n' | |
apps=($find) | |
total=${#apps[*]} | |
echo "Checking $total applications..." | |
echo "The following applications will break in Gatekeeper on 10.9.5 and Yosemite:" | |
count=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)createStatusItems | |
{ | |
const CGFloat itemLength = 22.0f; | |
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; | |
if ([userDefaults boolForKey:generalStatusbarSingleItemKey]) { | |
// create a single status item with a menu to access tools | |
NSMenu *statusMenu = [[[NSMenu alloc] initWithTitle:@"Status"] autorelease]; |
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
typealias BOOLAEN = Bool | |
typealias LIKEON68K = UInt16 | |
typealias LIKEONPENTIUM = UInt32 | |
typealias STRING = String | |
typealias STRINGINDEX = String.Index | |
typealias BOOL = Bool | |
typealias UNICODESCALER = UnicodeScalar | |
typealias GONADS = String | |
typealias NUMBERSWITHDOTS = Double |
OlderNewer