Skip to content

Instantly share code, notes, and snippets.

View whinc's full-sized avatar
🎯
Focusing

whincwu whinc

🎯
Focusing
View GitHub Profile

Linux 命令行快捷键

掌握这些 Shell 快捷键可大幅提升命令行操作效率。

基础操作

  • Ctrl L - 清屏
  • Ctrl C - 中断当前程序
  • Ctrl Z - 暂停当前进程(可用 fg 恢复)

历史命令

@whinc
whinc / recent-commit.sh
Created June 16, 2022 02:23
print commit messages betweenb the last two commit
#!/usr/bin/env bash
# 获取最近两次发布(通过tag判断)之间的提交记录
MODE="$1"
EXCLUDE=""
if [[ "$MODE" == "prod" ]]; then
EXCLUDE="test@*"
else
EXCLUDE="prod@*"
fi
tagName="$(git describe --tags --exclude "debug@*" --exclude "v*" --exclude "$EXCLUDE" HEAD^1)"
@whinc
whinc / QQUiUtils.java
Created July 31, 2015 09:39
工具方法,扩展Android中View的可触摸区域
/**
* 扩展View的触摸区域
* @param view 需要扩展触摸区域的View
* @param left 左边扩展范围(单位px,下同)
* @param top 上边扩展范围
* @param right 右边扩展范围
* @param bottom 下边扩展范围
*/
public static void extendTouchArea(final View view, final int left, final int top, final int right, final int bottom) {
if (view == null || view.getParent() == null) {