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
| Tramp open remote file | |
| M-x /usr@machine:/path/to.file |
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
| autossh -M 20000 -D 8001 root@106.186.28.75 -p 6666 | |
| autossh -M 20000 -L 127.0.0.1:8080:127.0.0.1:9050 root@106.186.28.75 |
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
| 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 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
| [Desktop Entry] | |
| Name=Eclipse | |
| Comment=ANDROID DEV SDK | |
| Encoding=UTF-8 | |
| Exec=/usr/local/eclipse/eclipse | |
| Icon=/usr/local/eclipse/icon.xpm | |
| Terminal=false | |
| Type=Application | |
| Categories=Application;Development; |
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 final static int clamp(int x, int low, int high) { | |
| return (x < low) ? low : ((x > high) ? high : x); | |
| } |
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
| (reduce conj '() [1 2 3 4]) |
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
| 1. 系统安装 | |
| 2. 网络链接 | |
| 3. 显卡驱动安装 | |
| 4. git安装 | |
| 5. vim安装 | |
| 6. 中文/输入法安装 |
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
| hdiutil convert -format UDRW -o <output-file> <input-iso-file> | |
| diskutil list /dev/disk | |
| diskutil unmountDisk /dev/diskN | |
| dd if=<dmg-file> of=/dev/rdisk1 |
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
| //定义 | |
| SEL class_func; | |
| //赋值 | |
| @interface foo | |
| -(int)add:int val; | |
| @end | |
| class_func = @selector(add:int); | |
| //执行 |
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
| sudo /Developer/Library/uninstall-devtools --mode=all |