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
export LANG=zh_CN.UTF-8 | |
alias ls="ls --color=tty" | |
alias e="explorer .; true" | |
# alias for git | |
alias glg="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias ga="git add ." | |
alias gco="git checkout" |
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
private static String numToCN(int n, boolean appendZero, boolean appendOne) { | |
if (n == 0) return ""; | |
if (n < 10) { | |
return (appendZero ? "零" : "") + NUMBER_MAPPING[n]; | |
} else if (n < 100) { | |
return (appendZero ? "零" : "") + (!appendOne && n < 20 ? "" : NUMBER_MAPPING[n / 10]) | |
+ "十" + (n % 10 == 0 ? "" : NUMBER_MAPPING[n % 10]); | |
} else if (n < 1000) { | |
return NUMBER_MAPPING[n / 100] + "百" + | |
numToCN(n % 100, n % 100 < 10, true); |
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
function Prompt | |
{ | |
if ($?) { | |
$color = "Green" | |
} else { | |
$color = "Red" | |
} | |
Write-Host -NoNewline -ForegroundColor $color '>> ' | |
$pwd = $(Get-Location) | |
if ($pwd.Path -eq $env:USERPROFILE) { |
NewerOlder