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
if [ "${CONFIGURATION}" = "Release" ]; then | |
path="$(pwd)/${INFOPLIST_FILE}" | |
build=$(defaults read $path CFBundleVersion) | |
defaults write $path CFBundleVersion $((build+1)) | |
fi |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/peacock.tmTheme", | |
"detect_indentation": true, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Menlo", | |
"font_size": 16, | |
"highlight_line": true, | |
"ignored_packages": | |
[ |
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 = Xhacker Liu | |
email = liu.dongyuan@gmail.com | |
[core] | |
editor = nano | |
excludesfile = /Users/xhacker/.gitignore_global | |
quotepath = false | |
pager = less -x4 | |
[credential] | |
helper = osxkeychain |
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
[ | |
{ "keys": ["ctrl+v"], "command": "paste_and_indent" }, | |
{ "keys": ["ctrl+shift+v"], "command": "paste" }, | |
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} }, | |
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} }, | |
{ "keys": ["ctrl+d"], "command": "right_delete" }, | |
{ "keys": ["ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} }, | |
{ "keys": ["ctrl+shift+a"], "command": "select_all" } | |
] |
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
alias cp="rsync -avrP --progress" | |
alias aria2c="aria2c -s 16 -x 16 -k 1M" | |
alias nl="sudo lsof -i | grep -i listen" |
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
import pygit2 | |
from pygit2 import GIT_SORT_TOPOLOGICAL, GIT_SORT_REVERSE | |
repo = pygit2.Repository("/path/to/the/repo") | |
hist_repo = pygit2.Repository("/path/to/the/repo/for/the/history") | |
parents = [] | |
for commit in repo.walk(repo.head.target, | |
GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE): | |
print "[Duplicating] " + commit.message, |
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
from timeit import timeit | |
setup = """ | |
results = [0 for _ in xrange(100)] | |
results[1] = 1 | |
results[2] = 1 | |
def fib(n): | |
if results[n]: | |
return results[n] |
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
find . ! -path . -maxdepth 1 -type d -exec sh -c '(cd {} && pwd && git pull)' ';' |
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 python | |
"""This script migrates Inboard beta library to Inboard App Store version | |
library.""" | |
import sqlite3 | |
import os | |
from os.path import expanduser | |
import subprocess | |
import shutil |
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
#import "UIAppearance+Swift.h" | |
@implementation UIView (UIViewAppearance_Swift) | |
+ (instancetype)swift_appearanceWhenContainedIn:(NSArray *)containerClasses | |
{ | |
NSUInteger count = containerClasses.count; | |
NSAssert(count <= 10, @"The count of containers greater than 10 is not supported."); | |
return [self appearanceWhenContainedIn: |
OlderNewer