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
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" -ipath "${SRCROOT}/pods" -prune -o \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" |
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
body { | |
font-family: Helvetica, arial, freesans, clean, sans-serif; | |
font-size: 15px; | |
line-height: 1.7; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
sudo xcode-select -switch /Applications/Xcode.app |
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 Person : NSObject | |
@property (nonatomic, copy) NSMutableArray *friendNames; | |
@end | |
@implementation Person | |
- (id)init{ | |
self = [super init]; |
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 | |
# Escape code | |
esc=`echo -en "\033"` | |
# Set colors | |
cc_red="${esc}[0;31m" | |
cc_green="${esc}[0;32m" | |
cc_yellow="${esc}[0;33m" | |
cc_blue="${esc}[0;34m" |
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
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) { | |
objc_msgSend([UIDevice currentDevice], @selector(setOrientation:), newOrientation); | |
} |
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
# 我的命令库 | |
# 编辑命令 | |
sg-cmdedit() { | |
subl ~/Documents/sugarbash.sh | |
} | |
# 重新加载命令 | |
sg-cmdreload() { | |
source ~/Documents/sugarbash.sh |
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
public protocol NamespaceWrappable { | |
associatedtype T | |
var ex: T { get } | |
static var ex: T.Type { get } | |
} | |
extension NamespaceWrappable { | |
public var ex: TypeWrapper<Self> { | |
return TypeWrapper(value: self) | |
} |
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
xcrun simctl status_bar <device> [list | clear | override <override arguments>] |
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
// | |
// ViewController.swift | |
// Interactive Animated Presentation | |
// "Visor" Effect | |
// | |
import UIKit | |
class ViewController: UIViewController { |