Skip to content

Instantly share code, notes, and snippets.

alexniver / sum.go
Last active Jun 14, 2019
calculate sum use all cpu core
View sum.go
package main
import (
func Sum(start, end int) chan int {
c := make(chan int)
s := 0
View 使用spf13-vim 写
  1. 首先根据官方文档安装spf13.vim
  2. 执行下面的语句
echo "let g:spf13_bundle_groups=['general', 'youcompleteme', 'programming', 'go', 'javascript', 'html', 'misc', 'writing' ]" >> ~/.vimrc.before.local 
vim +BundleInstall! +qall
  1. 将下面的配置加入到 .vimrc.local
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
alexniver / .md
Created Feb 13, 2019
spf13-vim + vim-go
View .md
  1. Install spf13-vim
sh <(curl -L)
  1. Install Go bundle
echo "let g:spf13_bundle_groups=['general', 'neocomplete', 'programming', 'ruby', 'python', 'go', 'javascript', 'html', 'misc', 'writing' ]" >> ~/.vimrc.before.local 
alexniver / go交叉编译ubuntu to
Created Jan 20, 2019
View go交叉编译ubuntu to
sudo apt-get install mingw-w64
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build main.go
alexniver / vimrc for windows
Last active Dec 27, 2018
View vimrc for windows
" General {{{
set nocompatible
set nobackup
set noswapfile
set history=1024
set autochdir
set whichwrap=b,s,<,>,[,]
set nobomb
set backspace=indent,eol,start whichwrap+=<,>,[,]
" Vim 的默认寄存器和系统剪贴板共享
alexniver / 遍历生成所有中文.md
Created Nov 12, 2018
View 遍历生成所有中文.md
package main

import (

func main() {
    startUnicodeStr := "4E00"
alexniver / init.vim
Last active Apr 29, 2018
my neovim config
View init.vim
let mapleader = ","
set nocompatible " Disable compatibility to old-time vi
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set mouse=v " middle-click paste with mouse
set hlsearch " highlight search results
set tabstop=4 " number of columns occupied by a tab character
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing
set expandtab " converts tabs to white space
View 7dtd by steamcmd
quick'n'dirty for linux:
login anonymous
force_install_dir yourdirectoryhere
app_update 294420 -beta latest_experimental