this is some code about node test,we use suptertest,chai,mocha,so you should use "npm install xxx" before you use the following code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"log" | |
"os/exec" | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
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') | |
" let Vundle manage Vundle, required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind r source-file ~/.tmux.conf \; display-message "Config reloaded" | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g mouse on | |
#禁止 rename window | |
set-option -g allow-rename off | |
set -g status-keys vi | |
set -g history-limit 10000 | |
set-window-option -g mode-keys vi | |
bind-key -T copy-mode-vi 'v' send -X begin-selection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// grpc | |
go get github.com/golang/protobuf/proto | |
go get github.com/gogo/protobuf/protoc-gen-gofast | |
go get github.com/gogo/protobuf/proto | |
go get github.com/gogo/protobuf/gogoproto | |
go get google.golang.org/grpc | |
// usual | |
go get github.com/golang/glog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
character-set-server=utf8 | |
collation-server=utf8_general_ci | |
skip-character-set-client-handshake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
LOOP_TEST: | |
for j := 1; j < 3; j += 1 { | |
fmt.Println("loop1") | |
for i := 1; i < 3; i = i + 1 { | |
fmt.Println("loop2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "time" | |
import "fmt" | |
func main() { | |
// 在这个例子中, 假设我们执行了一个外部调用, 2秒之后将结果写入c1 | |
c1 := make(chan string, 1) | |
go func() { | |
time.Sleep(time.Second * 2) | |
c1 <- "result 1" | |
}() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: golang:1.11 | |
# before_script: | |
# 代码格式化 | |
fmt: | |
script: | |
# 代码格式化 | |
- diff -u <(echo -n) <(gofmt $(find . -type f | grep -v vendor/ |grep -v /clients/ |grep -v /thrift_gen/ |grep -v kite.go|grep .go) ) | |
- diff -u <(echo -n) <(goimports $(find . -type f | grep -v vendor/ |grep -v /clients/ |grep -v /thrift_gen/ |grep -v kite.go|grep .go) ) |
OlderNewer