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/bash | |
# hide Desktop clutter (Desktop is just a folder in Finder) | |
defaults write com.apple.finder CreateDesktop false | |
killall Finder | |
# enable "Purple Button Mode" | |
# see https://tidbits.com/2009/10/06/revealing-mac-os-xs-hidden-single-application-mode/ | |
defaults write com.apple.dock single-app -bool true | |
killall Dock |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>shortcut</key> | |
<string>:smile:</string> | |
<key>phrase</key> | |
<string>😄</string> | |
</dict> |
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)describePreferredFonts | |
{ | |
static NSArray *textStyles; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
textStyles = @[UIFontTextStyleTitle1, // iOS 9 | |
UIFontTextStyleTitle2, // iOS 9 | |
UIFontTextStyleTitle3, // iOS 9 | |
UIFontTextStyleHeadline, | |
UIFontTextStyleSubheadline, |
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
Pretty empty out here. | |
Here comes our first planet… | |
As it turns out, things are pretty far apart. | |
We’ll be coming up on a new planet soon. | |
Sit tight. | |
Most of space is just space. | |
Halfway home. | |
Destination: Mars! | |
It would take about seven months to travel this distance in a spaceship. | |
Better be some good in-flight entertainment. |
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
Chinese (Simplified) | |
China (CN) | |
Chinese (Traditional) | |
Taiwan (TW) | |
Macau (MO) | |
Danish | |
Denmark (DK) |
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
~ $ traceroute comcast.net | |
traceroute: Warning: comcast.net has multiple addresses; using 69.252.80.75 | |
traceroute to comcast.net (69.252.80.75), 64 hops max, 52 byte packets | |
1 10.0.1.1 (10.0.1.1) 1.005 ms 0.632 ms 0.664 ms | |
2 * * * | |
3 * * * | |
4 * * * | |
5 * * * | |
6 * * * | |
7 * * * |
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)describeAllFonts | |
{ | |
NSMutableArray *fonts = [NSMutableArray array]; | |
NSArray *familyNames = [UIFont familyNames]; | |
for (NSString *familyName in familyNames) | |
{ | |
NSArray *fontNames = [UIFont fontNamesForFamilyName:familyName]; | |
for (NSString *fontName in fontNames) | |
{ | |
UIFont *font = [UIFont fontWithName:fontName size:14]; |
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
+ (NSString *)preferredContentSizeDescription | |
{ | |
// see http://johnszumski.com/blog/implementing-dynamic-type-on-ios7 | |
NSString *contentSize = [UIApplication sharedApplication].preferredContentSizeCategory; | |
NSString *description; | |
if ([contentSize rangeOfString:@"Accessibility"].location != NSNotFound) | |
{ | |
// Accessibility Content Size Category Constants |
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)describePreferredFonts | |
{ | |
static NSArray *textStyles; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
textStyles = @[UIFontTextStyleHeadline, | |
UIFontTextStyleSubheadline, | |
UIFontTextStyleBody, | |
UIFontTextStyleFootnote, | |
UIFontTextStyleCaption1, |
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
@interface NSManagedObject (Serialization) | |
- (NSDictionary*) toDictionary; | |
- (void) populateFromDictionary:(NSDictionary*)dict; | |
+ (NSManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict | |
inContext:(NSManagedObjectContext*)context; | |
@end |
NewerOlder