Skip to content

Instantly share code, notes, and snippets.

@xqin
xqin / keybase.md
Created September 1, 2022 02:19
keybase

Keybase proof

I hereby claim:

  • I am xqin on github.
  • I am xqin (https://keybase.io/xqin) on keybase.
  • I have a public key ASAOQPH4yZXAHxHBHTTRL2oxk8GZRpoVrlStWWEnaDRT1Ao

To claim this, I am signing this object:

@xqin
xqin / HyperSwitch expired.md
Created August 1, 2022 05:21
HyperSwitch expired patch
@xqin
xqin / nginx.md
Created July 17, 2019 13:15
nginx proxy_pass example

nginx.conf

user  nginx;
worker_processes  4;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

@xqin
xqin / repo
Last active July 12, 2019 06:57
快速在浏览器中打开当前仓库的 WEB URL 地址
命令: repo
功能: 用于快速在浏览器中打开当前仓库的 WEB URL 地址
使用方式: 复制下面的内容粘贴到 ~/.bash_profile 中, 之后关闭Terminal, 重新打开 生效, 之后进入任意一个git仓库的目录中, 输入 repo 即可看到效果.
```bash
## {{{ open git repo remote url in browser
function repo () {
@xqin
xqin / checkout-git-branch-with-command-click-in-iterm2.md
Created October 11, 2018 07:06
checkout git branch with ⌘+Click in ITerm2
  1. Go to Preferences->Advanced
  2. Under Smart Selection, click the Edit button
  3. Click the + to add a new rule
  4. For the Regular expression, use ^\s*(?:remotes/origin/)?([a-z0-9A-Z][a-zA-Z0-9\/\.\-\_]*)$
  5. For priority, choose Very Low
  6. Click Edit Actions
  7. Click the + to add a new action
  8. Title Switch Git Branch
  9. Action Run Coprocess...
  10. Parameter ~/sw.sh \1