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
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
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
// 使用CABasicAnimation时,如果需要暂停动画、恢复动画时可以通过pauseLayer | |
- (void)pauseLayer:(CALayer*)layer { | |
if (layer.speed == 0.0) { | |
return; | |
} | |
CFTimeInterval pausedTime = [layer convertTime:CACurrentMediaTime() fromLayer:nil]; | |
layer.speed = 0.0; | |
layer.timeOffset = pausedTime; | |
} |
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
# https://gist.github.com/gists/1876339 | |
*.DS_Store | |
# ignore Xcode compiled build folder and application. | |
*build | |
*.app | |
# ignore Xcode User .pbxuser and .mode1v3 files. | |
*.pbxuser | |
*.mode1v3 |
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 | |
source ~/.bash_profile | |
hash oclint > /dev/null | |
if [ $? -eq 1 ]; then | |
echo > "oclint not found, analyzing stopped" | |
exit 1 | |
fi | |
cd ${TARGET_TEMP_DIR} |
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
// Author: Oleg Andreev <[email protected]> | |
// May 28, 2011 | |
// Do What The Fuck You Want Public License <http://www.wtfpl.net> | |
#import "NSData+OADataHelpers.h" | |
#if !__has_feature(objc_arc) | |
#error ARC must be enabled! | |
#endif |
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
// | |
// NSData+HG_DataHealing.h | |
// HGDataHealing | |
// | |
// Created by 缪 和光 on 14-3-7. | |
// Copyright (c) 2014年 Hokuang. 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
@interface NSDate (PrettyDate) | |
- (NSString *)prettyDate; | |
@end |
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 | |
echo "======================" | |
echo "Auto backup archive file [start]" | |
echo "Configuration [$CONFIGURATION]" | |
if [ "$CONFIGURATION" == "Debug" ]; then | |
echo "Skipping configuration debug" | |
echo "======================" | |
exit 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
@throw [NSException exceptionWithName:NSInternalInconsistencyException | |
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)] | |
userInfo:nil]; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder