This file contains hidden or 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 | |
# | |
echo '' | |
echo '/*教程请参考:极路由Shadowsocks家庭无痛翻墙实践*/' | |
echo 'https://luolei.org/hiwifi-shadowsocks/' | |
echo 'by @foru17' | |
echo '' | |
echo '' | |
echo '那一天,' | |
echo '人类终于回想起了,' |
This file contains hidden or 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 | |
# | |
echo '' | |
echo '/*教程请参考:极路由Shadowsocks家庭无痛翻墙实践*/' | |
echo 'https://luolei.org/hiwifi-shadowsocks/' | |
echo 'by @foru17' | |
echo '' | |
echo '' | |
echo '那一天,' | |
echo '人类终于回想起了,' |
This file contains hidden or 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
# get GIT revision number | |
buildNumber=`git rev-list --count HEAD` | |
# write build number | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${buildNumber}" "${INFOPLIST_FILE}" | |
# if [ "$CONFIGURATION" == "Release" ]; then | |
# # version number like this V0.20160109.004 |
This file contains hidden or 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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @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" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
This file contains hidden or 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
tell application "Finder" | |
set pathList to (quoted form of POSIX path of (folder of the front window as alias)) | |
set command to "clear; cd " & pathList | |
end tell | |
tell application "System Events" | |
-- some versions might identify as "iTerm2" instead of "iTerm" | |
set isRunning to (exists (processes where name is "iTerm")) or (exists (processes where name is "iTerm2")) | |
end tell | |
This file contains hidden or 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
@IBAction func moveBlock(sender: AnyObject) { | |
UIView.animateWithDuration(3, animations: { () -> Void in | |
self.viewToAnimate.frame = .zero | |
}) { (success) -> Void in | |
} | |
} | |
@IBAction func stop(sender: AnyObject) { | |
if viewToAnimate.layer.speed == 0 { | |
resumeLayer(viewToAnimate.layer) |
This file contains hidden or 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/bash | |
# 这是一个pre-commit 的脚本 | |
# Run SwiftLint | |
START_DATE=$(date +"%s") | |
echo $START_DATE | |
SWIFT_LINT=/usr/local/bin/swiftlint |
This file contains hidden or 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 vc = CustomViewController() | |
vc.modalTransitionStyle = UIModalTransitionStyle.CrossDissolve | |
vc.modalPresentationStyle = UIModalPresentationStyle.OverFullScreen | |
presentViewController(vc, animated: true, completion: nil) | |
// in CustomViewController | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let lightEffect = UIBlurEffect(style: .Light) | |
let lightView = UIVisualEffectView(effect: lightEffect) |
This file contains hidden or 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
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"settings": { | |
"ecmascript": 6, | |
"jsx": true | |
}, |