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
git log | grep -e 'commit [a-zA-Z0-9]*' | wc -l | |
# 不准确,如果提交信息里有commit ...字样也会计算进去 | |
# UPDATE: | |
git log --oneline | wc -l | |
# UPDATE 2: | |
# get the commit count for a revision (HEAD, master, a commit hash) | |
git rev-list --count <revision> | |
# get the commit count across all branches |
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
source ~/git-completion.bash | |
source ~/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE="true" | |
export GIT_PS1_SHOWSTASHSTATE="true" | |
export GIT_PS1_SHOWUNTRACKEDFILES="true" | |
export GIT_PS1_SHOWUPSTREAM="auto" | |
export GIT_PS1_SHOWCOLORHINTS="true" | |
green=$'\e[0;32m' |
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
const ppi = function(height, width, inch) { | |
return Math.round(Math.sqrt(height*height + width*width) / inch); | |
} |
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
Found Xcode project AwesomeProject.xcodeproj | |
Launching iPhone 6 (iOS 9.2)... | |
Building using "xcodebuild -project AwesomeProject.xcodeproj -scheme AwesomeProject -destination id=076CF12B-FDC4-448D-A592-F9158B9B8C28 -derivedDataPath build" | |
User defaults from command line: | |
IDEDerivedDataPathOverride = /Users/lovej/Documents/personal/projects/AwesomeProject/ios/build | |
=== BUILD TARGET RCTImage OF PROJECT RCTImage WITH CONFIGURATION Debug === |
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
{ | |
"always_show_minimap_viewport": true, | |
// Goto Anything or Find in Files | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", |
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
# pretty git log history | |
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %an' | |
# add it to alias | |
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %an'" | |
# now we can use <git-lg> | |
git lg |
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
execute pathogen#infect() | |
syntax enable | |
set background=dark | |
colorscheme solarized | |
filetype plugin on | |
filetype indent on | |
set nu |
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
# You can try netstat | |
netstat -vanp tcp | grep 3000 | |
# For OSX El Capitan and newer (or if your netstat doesn't support -p), use lsof | |
lsof -i tcp:3000 |
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
defaults write com.apple.finder AppleShowAllFiles -bool true | |
killall Finder | |
# then restart finder |
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
! Put user rules line by line in this file. | |
! See https://adblockplus.org/en/filter-cheatsheet | |
||gist.github.com^ | |
||github.io^ | |
||githubusercontent.com^ | |
||s3.amazonaws.com^ | |
||postmates.com^ | |
||imgur.com^ | |
||quora.com^ | |
||quoracdn.net^ |
OlderNewer