Skip to content

Instantly share code, notes, and snippets.

Avatar
🌈
Coding

Xiao Liang yxliang01

🌈
Coding
View GitHub Profile
@yxliang01
yxliang01 / vscode-mypy.bash
Created May 29, 2019
A wrapper for correcting vscode-python extension invokes mypy incorrect problem.
View vscode-mypy.bash
#!/bin/bash
# Author: Xiao Liang <https://github.com/yxliang01>
# Should invoke this in the root package which is also supposed to be the VS Code workspace root
args=( "$@" )
args[-1]=${args[-1]#"$(pwd)/"}
# For debugging
@yxliang01
yxliang01 / _tmux_pane_words.zsh
Created Jan 19, 2018 — forked from blueyed/_tmux_pane_words.zsh
ZSH configuration to complete words from tmux pane(s)
View _tmux_pane_words.zsh
# Complete words from tmux pane(s) {{{1
# Source: http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html
# Gist: https://gist.github.com/blueyed/6856354
_tmux_pane_words() {
local expl
local -a w
if [[ -z "$TMUX_PANE" ]]; then
_message "not running inside tmux!"
return 1
fi
@yxliang01
yxliang01 / robbyrussell-hostname.zsh-theme
Created Aug 26, 2017 — forked from SteelPangolin/robbyrussell-hostname.zsh-theme
Tweak robbyrussell ZSH theme to prepend hostname
View robbyrussell-hostname.zsh-theme
local hostname="%{$fg_bold[black]%}%m"
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${hostname} ${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"