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"> | |
<dict> | |
<key>Label</key> | |
<string>com.lextang.shadowsocks</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/node</string> | |
<string>/Users/Lex/Dropbox/shadowsocks-nodejs/local.js</string> |
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
dhcp-option=252,http://10.0.0.100:7777/pac | |
address=/r/10.0.0.1 | |
address=/z/10.0.0.100 | |
expand-hosts | |
cache-size=10000 | |
server=/amazonaws.com/8.8.4.4 | |
server=/appspot.com/8.8.4.4 |
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
char *constellationByNSDate(NSDate *date) { | |
static char *constellations[13] = {"Capricorn","Aquarius","Pisces","Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn"}; | |
static unsigned short constellationSeperates[12] = {20,19,21,21,21,22,23,23,23,24,22,22}; | |
unsigned short dateStr[5]; | |
NSLocale *CNLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_Hans_CN"]; | |
[[date descriptionWithLocale:CNLocale] getCharacters:(unichar*)dateStr range:(NSRange){5, 5}]; | |
unsigned short month = (dateStr[0] - '0') * 10 + (dateStr[1] - '0') - 1; | |
unsigned short day = (dateStr[3] - '0') * 10 + (dateStr[4] - '0'); | |
return constellations[month + (day < constellationSeperates[month] ? 0 : 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
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" -type f \ | |
\( \ | |
-name "*.h" \ | |
-or -name "*.m" \ | |
-or -name "*.swift" \ | |
\) \ | |
-print0 \ | |
| xargs -0 egrep --with-filename --line-number \ |
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
#import "LTScrollView.h" | |
@implementation LTScrollView | |
- (void)layoutSubviews | |
{ | |
CGFloat perfectContentWidth = 0.0f; | |
CGFloat perfectContentHeight = 0.0f; | |
BOOL isHorizontalScrollIndicatorVisible = self.showsHorizontalScrollIndicator; |
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
static NSString *phonetic(NSString *sourceString) { | |
NSMutableString *source = [sourceString mutableCopy]; | |
CFStringTransform((__bridge CFMutableStringRef) source, NULL, kCFStringTransformMandarinLatin, NO); | |
return source; | |
} | |
static inline NSString *initialPhoneticLetter(NSString *string) { | |
return [[[[phonetic([string substringToIndex:1]) substringToIndex:1] uppercaseString] | |
stringByReplacingOccurrencesOfString:@"\u0100" withString:@"A"] | |
stringByReplacingOccurrencesOfString:@"\u00c9" withString:@"E"]; |
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 TARGET_IPHONE_SIMULATOR | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wimplicit" | |
// Log all notifications via tail -f /tmp/msgSends-* | |
instrumentObjcMessageSends(YES); | |
#pragma clang diagnostic pop | |
#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
http://devstreaming.apple.com/videos/wwdc/2013/710xfx3xn8197k4i9s2rvyb/710/710-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/202xdx2x47ezp1wein/202/202-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/413xdx5x97itb5ek4yex3r7/413/413-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/612xax4xx65z1ervy5np1qb/612/612-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/221xex4xxohbllf4hblyngt/221/221-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/220xbx4xipaxfd1tggxuoib/220/220-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/711xcx4x8yuutk8sady6t9f/711/711-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/404xbx2xvp1eaaqonr8zokm/404/404-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/505xbx4xrgmhwby4oiwkrpp/505/505-HD.mov?dl=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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>info.chenyufei.cow</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/Lex/Dropbox/bin/cow</string> | |
<string>-core=4</string> |
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
require 'sinatra' | |
require 'pngqr' | |
require 'slim' | |
require 'stylus' | |
require 'stylus/tilt' | |
set :site_name => 'QRCode.rb' | |
set :server => %w[thin] | |
set :port => 9494 | |
#set :dump_errors => true |