(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4 | |
| defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 | |
| defaults write com.apple.xcode PBXNumberOfParallelBuildSubtasks 4 | |
| defaults write com.apple.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 |
| let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] | |
| extension Array { | |
| func splitBy(subSize: Int) -> [[Element]] { | |
| return 0.stride(to: self.count, by: subSize).map { startIndex in | |
| let endIndex = startIndex.advancedBy(subSize, limit: self.count) | |
| return Array(self[startIndex ..< endIndex]) | |
| } | |
| } | |
| } |
| #!/bin/sh | |
| UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
| # make sure the output directory exists | |
| mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
| # Step 1. Build Device and Simulator versions | |
| xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
| xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <opml version="1.0"> | |
| <head> | |
| <title>Subscriptions - WHY</title> | |
| </head> | |
| <body> | |
| <outline text="cool" title="cool"> | |
| <outline htmlUrl="http://kedebug.com/" title="kedebug" xmlUrl="http://kedebug.com/atom.xml" type="rss" text="kedebug"/> | |
| <outline htmlUrl="http://lucida.me/" title="Lucida" xmlUrl="http://lucida.me/atom.xml" type="rss" text="Lucida"/> | |
| <outline htmlUrl="http://www.alloyteam.com" title="Web前端 腾讯AlloyTeam Blog | 愿景: 成为地球卓越的Web团队!" xmlUrl="http://www.alloyteam.com/feed/" type="rss" text="Web前端 腾讯AlloyTeam Blog | 愿景: 成为地球卓越的Web团队!"/> |
| #!/bin/sh | |
| # Example usage | |
| # cd into directory that has @3x images | |
| # ./whatever-you-name-this.sh | |
| # Remember to chmod +x the script | |
| resize () { | |
| ls *@3x.png | awk '{print("convert "$1" -filter box -resize '$1' "$1)}' | sed 's/@3x/'$2'/2' | /bin/sh | |
| } |
| #!/bin/sh | |
| UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
| # make sure the output directory exists | |
| mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
| # Step 1. Build Device and Simulator versions | |
| xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
| xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
| func p_setupTextLayer(text: String) -> CAShapeLayer { | |
| var letters = CGPathCreateMutable() | |
| let font = CTFontCreateWithName("Helvetica-Bold", 72, nil) | |
| let attrs = [kCTFontAttributeName: font] | |
| var attrString = NSAttributedString(string: text, attributes: attrs) | |
| let line = CTLineCreateWithAttributedString(attrString) | |
| let runArray = CTLineGetGlyphRuns(line) | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #################### | |
| # FROM MAIN COMPUTER | |
| #################### | |
| # Create the sync directory in Dropbox | |
| $ mkdir ~/Dropbox/sublime-text-3 | |
| # Move your ST3 "Packages" and "Installed Packages" to Dropbox | |
| $ cd ~/Library/Application\ Support/Sublime\ Text\ 3 | |
| $ mv Packages/ ~/Dropbox/sublime-text-3 | |
| $ mv Installed\ Packages/ ~/Dropbox/sublime-text-3 |