Skip to content

Instantly share code, notes, and snippets.

Avatar

Shengzhi.Chen chenshengzhi

  • Xiamen, Fujian, China
View GitHub Profile
@chenshengzhi
chenshengzhi / NSErrorCodeDefine
Last active Aug 29, 2015
NSError code definition file
View NSErrorCodeDefine
FoundationErrors.h
NSURLError.h
CFNetworkErrors.h
View hostsInstall
#!/bin/bash
wget https://raw.githubusercontent.com/racaljk/hosts/master/hosts -O ~/hosts
sed -i '' 's/# Modify hosts start/#user define\
\#127.0.0.1 localhost\
#127.0.0.1 localhost\
\
# Modify hosts start/g' ~/hosts
sudo mv ~/hosts /etc/hosts
View Podfile
platform :ios, '7.0'
pod 'MJExtension', '~> 2.3.6'
pod 'BKECircularProgressView', '~> 0.2'
pod 'SZTextView', '~> 1.2.1'
pod 'HZActivityIndicatorView', '~> 0.0.1'
pod 'FXNotifications', '~> 1.1'
pod 'JSBadgeView', '~> 1.4.1'
pod 'SDWebImage', '~> 3.7.2'
pod 'AFNetworking', '~> 2.5.4'
View sublimeText3.md

sublime text 3:

1.plugins  
2.C build  
3.keymap  
4.preferences  
5.OS X command line tool  
6.header omment snippet  
@chenshengzhi
chenshengzhi / installUpdateXcodePlugins
Last active Feb 15, 2016
install Update Xcode Plugins
View installUpdateXcodePlugins
#!/bin/bash
########### 要安装的URL列表############
plugins=(\
'https://github.com/onevcat/VVDocumenter-Xcode' \
'https://github.com/FuzzyAutocomplete/FuzzyAutocompletePlugin' \
'https://github.com/markohlebar/Peckham' \
'https://github.com/trawor/XToDo' \
'https://github.com/omz/ColorSense-for-Xcode' \
'https://github.com/dhcdht/DXXcodeConsoleUnicodePlugin' \
View .vimrc
set nocompatible
set enc=utf-8
set history=500
filetype plugin indent on
set autoindent
set smartindent
View swiftLibrary.txt
Alamofire: HTTP网络库
Surge: 基于Accelerate框架开发,用于执行矩阵数学、数字信号处理以及图像处理等方面
SwiftyJSON: 解析JSON
Dollar: 了有用的函数式编程辅助方法
ExSwift: 标准类型和类的扩展
SwiftTask: 状态机
Haneke: 轻量级iOS通用缓存
Cartography: Swift声明Auto Layout
XCGLogger: log
View swift中的下划线(_)用法.swift
//if循环中, 替代变量名来忽略对值的访问
let base = 3
let power = 10
var answer = 1
for _ in 1...power {
answer *= base
}
print("\(base) to the power of \(power) is \(answer)")
@chenshengzhi
chenshengzhi / macHideDockParameters.sh
Created Nov 5, 2015
mac dock 自动隐藏延迟设置
View macHideDockParameters.sh
//不延迟
defaults write com.apple.Dock autohide-delay -float 0 && killall Dock
//恢复默认
defaults delete com.apple.Dock autohide-delay && killall Dock
View gemUninstallAllPackets.sh
for i in `gem list --no-versions`; do sudo gem uninstall -aIx $i; done