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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>ApplePressAndHoldEnabled</key> | |
<false/> | |
<key>AppleScrollAnimationEnabled</key> | |
<integer>0</integer> |
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
set ts=4 "tab 四字节 | |
set expandtab | |
set autoindent "自动格式化 | |
set number | |
:inoremap jj <Esc> |
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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# | |
# Mar 2013 Yad Smood | |
# VCS | |
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} " | |
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}" |
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 you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
alias ls='ls -G' | |
alias grep='grep --color' | |
# autosuggest 的补全快捷键为逗号 | |
bindkey ',' autosuggest-accept | |
ANDROID_HOME=~/Library/Android/sdk/platform-tools/ |
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
1. 查看当前 conda 环境中的配置 | |
conda list | |
2. 查看 conda 管理的环境列表 | |
conda info --envs | |
3. conda 切换环境 | |
conda activate py2<environment name> |
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
### 查看所有进程 | |
ps aux | |
### 杀死某个进程 | |
kill [pid] | |
### 查找文件夹名 | |
find / -name AnmyTest -type d(查找AnmyTest目录位置) | |
### 删除当前文件夹下除了 xx 文件外所有文件 | |
rm -rf `ls | egrep -v '(README.md)'` // 删除当前文件夹下除了 README.md 外所有文件 |
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
### 1. 查看一个 https 连接的证书链 | |
openssl s_client -connect douban.com:443 |
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 android.content.Context; | |
public class DensityUtil { | |
/** | |
* 根据手机的分辨率从 dp 的单位 转成为 px(像素) | |
*/ | |
public static int dip2px(Context context, float dpValue) { | |
final float scale = context.getResources().getDisplayMetrics().density; | |
return (int) (dpValue * scale + 0.5f); |
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
1. 跳转到上一个光标处:ctrl - | |
2. 跳转到下一个光标处:ctrl shift - | |
3. 跳转到实现处:cmd F12 | |
4. 查找symbol: cmd shift o | |
5. 块编辑(block edit): shift option click | |
6. 整行上/下移动 | |
[option] + [上下方向] | |
7. 格式化代码:[shift] + [Option] + f | |
8. 搜索出来的结果,全部按行搞到新的文件中: |
NewerOlder