Skip to content

Instantly share code, notes, and snippets.

View shanzi's full-sized avatar

Chase Zhang shanzi

View GitHub Profile
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching.
set incsearch
"" -- Plugins --
set ideajoin
local wezterm = require 'wezterm';
return {
enable_tab_bar = false,
font = wezterm.font_with_fallback({
"JetBrainsMono Nerd Font",
"PingFang SC",
}),
font_size = 12,
colors = {
@shanzi
shanzi / gittp.go
Last active February 26, 2024 03:42
A simple Git Http Server in go
/*
gittip: a basic git http server.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright 2014 Chase Zhang <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
@shanzi
shanzi / .tmux.conf
Last active March 11, 2023 15:57
My tmux configuration
run-shell "powerline-daemon -q"
source "$HOME/.local/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf"
set -g default-terminal "xterm-256color"
# set-option -g default-command "/usr/local/bin/reattach-to-user-namespace -l /bin/zsh"
# install reattach-to-user-namespace first
# --> brew install reattach-to-user-namespace
new-session
@shanzi
shanzi / custom.zsh-theme
Created January 23, 2013 10:59
This zsh theme theme is modified from the default oh-my-zsh theme robbyrussell.zsh-theme
PROMPT='%{$fg_bold[green]%}%n %{$fg_bold[red]%}➜ %{$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]%})"
@shanzi
shanzi / init.vim
Last active June 7, 2024 14:49
This configuration use vundle to arrange vim plugins
" install vundle first:
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
set hidden
set nocompatible " do not compatible with vi
set backspace=indent,eol,start " allow backspace to delete char
set modeline
set shiftwidth=4 " set tab width to 4 space
set tabstop=4
set expandtab