- Introduction to Functional Programming Johannes Weiß - http://kcy.me/1ngiv
- ReactiveCocoa at MobiDevDay Andrew Sardone - http://kcy.me/1nhl3
- The Future Of ReactiveCocoa Justin Spahr-Summers - http://kcy.me/1nhs7
- Enemy of the State Justin Spahr-Summers - http://kcy.me/1njzs
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - http://kcy.me/1pyva
- Functioning as a Functionalist Andy Matuschak - http://kcy.me/22o45
- Controlling Complexity in Swift Andy Matuschak - http://kcy.me/23sc9
- Functional and reactive programming with Swift Ash Furrow -
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 *pattern = @"([\\.\\+\\(\\)\\-\\_\\s])"; | |
NSRegularExpression *re = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:nil]; | |
NSString *replaced = [re stringByReplacingMatchesInString:phoneNumber options:0 range:NSMakeRange(0, [phoneNumber length]) withTemplate:@""]; | |
NSLog(@"%@", replaced); |
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)drawRect:(CGRect)rect | |
{ | |
CGContextRef con = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(con, [UIColor grayColor].CGColor); | |
CGContextFillRect(con, rect); | |
CGContextAddEllipseInRect(con, self.circle); // self.circle is a property of CGRect | |
CGContextClip(con); | |
CGContextClearRect(con, self.circle); | |
} |
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
NSDictionary *normalSettings = @{UITextAttributeTextColor: [UIColor grayColor], UITextAttributeFont: [UIFont systemFontOfSize:13]}; | |
[self.segmentControl setTitleTextAttributes:normalSettings forState:UIControlStateNormal]; | |
NSDictionary *highlightedSettings = @{UITextAttributeTextColor: [UIColor red:43 green:206 blue:119 alpha:1.0], UITextAttributeFont: [UIFont systemFontOfSize:16]}; | |
[self.segmentControl setTitleTextAttributes:highlightedSettings forState:UIControlStateSelected]; |
mach_absolute_time() CACurrentMediaTime() CFAbsoluteTimeGetCurrent()
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
#!/usr/bin/env ruby | |
if ARGV.length < 1 | |
puts "Please input file name." | |
exit | |
end | |
mp3_name = ARGV[0] + "" | |
m4a_name = mp3_name.split(".")[0] + ".m4a" | |
puts "******************************************" |
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 | |
# bump_build_number_per_build.sh | |
# @desc Automaticvally create build number depend on current time. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" |
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
[user] | |
name = Pavan Kumar Sunkara | |
email = pavan.sss1991@gmail.com | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com |
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
# Raw command | |
BACKUP=$(tmutil latestbackup) ; if [ "$(cat ~/.lastbackup 2>/dev/null)" != "$BACKUP" ]; then echo $BACKUP > ~/.lastbackup ; osascript -e "display notification \"$(echo $BACKUP | xargs basename)\" with title \"Backup finished\""; fi | |
# As cron entry | |
*/5 * * * * BACKUP=$(tmutil latestbackup 2>/dev/null) ; if [ "$(cat ~/.lastbackup 2>/dev/null)" != "$BACKUP" ]; then echo $BACKUP > ~/.lastbackup ; osascript -e "display notification \"$(echo $BACKUP | xargs basename)\" with title \"Backup finished\""; fi 2>&1 >/dev/null |
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
let s = "fdsf6fdsf7dsf7s7sdf789sdff9s8fs8df98dfsdsd5fsf" | |
let r = s.characters.flatMap { Int(String($0)) != nil ? nil : $0 }.reduce("") { $0 + String($1) } | |
Swift.print(r) |
OlderNewer