⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 | |
# Script for managing build and version numbers using git and agvtool. | |
# Change log: | |
# v1.0 18-Jul-11 First public release. | |
# v1.1 29-Sep-12 Launch git, agvtool via xcrun. | |
version() { |
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 | |
# | |
# newpost.rb new-post-title | |
# | |
# Author: Mark Nichols, 8/2011 | |
# | |
# This script automates the process of creating a new Octopress posting. | |
# 1. The Octopress rake new_post task is called passing in the posting name | |
# 2. The Octopress rake isolate taks is called to sequester all other postings in the _stash | |
# 3. The new file is opened in TextMate |
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 'rake/clean' | |
BIN = "public_html" | |
HAML = FileList['**/*.haml'] | |
LESS = FileList['**/*.less'] | |
COFFEE = FileList['**/*.coffee'] | |
SASS = FileList['**/*.scss'] | |
HTML = HAML.ext('html') |
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
# | |
# iOS 友盟发布渠道自动化脚本 | |
# | |
# - 在 Archive 的 "Post-action" 添加脚本去执行 "/bin/sh $SRCROOT/package.sh" | |
# - 确保在 "Provide build setting from" 选择了当前的 App | |
# - 在项目根目录($SRCROOT)添加 "iTunesArtwork" 文件(符合 App Store 提交要求的 512x512 px, PNG 格式) | |
# - 在下面 "" 设置你需要的发布渠道(空格分隔) | |
# - 在下面设置打包后的 ipa 的输出路径(可选) | |
# - 执行 "Product > Archive" | |
# |
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
set newline to ASCII character 10 | |
set availableFormat to "\\033[0;37m" | |
set awayFormat to "\\033[0;30m" | |
set idleFormat to "\\033[0;30m" | |
set offlineFormat to "\\033[0;30m" | |
set unknownFormat to "\\033[0;30m" | |
set resetFormat to "\\033[0;30m" | |
set ownName to "****YOURNAME****" |
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/tclsh8.5 | |
# | |
# Usage: git-unmerged branch1 branch2 | |
# | |
# Shows all the non-common commits in the two branches, where non-common | |
# commits means simply commits with a unique commit *message*. | |
proc getlog branch { | |
lrange [split [exec git log $branch --oneline] "\n"] 0 400 | |
} |
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
// | |
// FDRCollectionViewCell.h | |
// | |
// | |
// Created by Brent Royal-Gordon on 7/10/13. | |
// | |
// | |
#import <UIKit/UIKit.h> |
- Array 是 value type,使用 structs 实现
- 数据类型没有隐式转换
- 对于 String,count() 的复杂度是 O(n),每一个 Character 都是 unicode scalars 的序列
- raw values 和 associated values 的区别
- 如果必要,对于实现了 _ObjectiveCBridgeable 的 value types 会被自动桥接成 reference types
- 讲一下 unowned 和 weak 的区别
- 改 struct 的属性的方法名前要加 mutating,但如果这个 struct 用 let 声明的,改不了。修正:网友指出用 nonmutating set 也可以改属性。
- nil 和 .None 的区别
- capture list in closure
- 举一个 guard ... where 的例子
OlderNewer