Skip to content

Instantly share code, notes, and snippets.

#source "/home/xyyu/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
#source "/home/xyyu/.tmuxline.conf"
set-option -g default-terminal "screen-256color"
setw -g mode-keys vi
#set -g mode-mouse on
set -g renumber-windows on
#unbind C-s
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# Mar 2013 Yad Smood
# VCS
YS_VCS_PROMPT_PREFIX1="%{$reset_color%}"
YS_VCS_PROMPT_PREFIX2="%{$terminfo[bold]$fg[cyan]%}" #"%{$fg[cyan]%}"
@yxdb
yxdb / .vimrc
Created February 23, 2017 03:45
set nocompatible " be iMproved, required
set backspace=indent,eol,start
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@yxdb
yxdb / .zshrc
Created February 23, 2017 03:44
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="xyyu-ys"
# Uncomment the following line to use case-sensitive completion.
@yxdb
yxdb / sa-is.cpp
Last active August 29, 2015 14:18
SA-IS Algorithm for linear time/space suffix array construction
namespace SA {
int sa[N], rk[N], ht[N], s[N<<1], t[N<<1], p[N], cnt[N], cur[N];
#define pushS(x) sa[cur[s[x]]--] = x
#define pushL(x) sa[cur[s[x]]++] = x
#define inducedSort(v) fill_n(sa, n, -1); fill_n(cnt, m, 0); \
for (int i = 0; i < n; i++) cnt[s[i]]++; \
for (int i = 1; i < m; i++) cnt[i] += cnt[i-1]; \
for (int i = 0; i < m; i++) cur[i] = cnt[i]-1; \
for (int i = n1-1; ~i; i--) pushS(v[i]); \
for (int i = 1; i < m; i++) cur[i] = cnt[i-1]; \
@yxdb
yxdb / p5
Last active August 29, 2015 14:12
Project 5: Diff
go to the 1st comment for the problem statement please. :)