Skip to content

Instantly share code, notes, and snippets.

View alexniver's full-sized avatar
🏠
Working from home

alexniver

🏠
Working from home
View GitHub Profile
@alexniver
alexniver / 遍历生成所有中文.md
Created November 12, 2018 11:20
生成范围内unicode的中文
package main

import (
    "fmt"
    "strconv"
)

func main() {
 startUnicodeStr := "4E00"
@alexniver
alexniver / init.vim
Last active April 29, 2018 17:33
my neovim config
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
@alexniver
alexniver / using gvm.md
Last active February 20, 2018 20:30
using gvm

install

bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

using golang version 1.5.1, golang 1.5+ need 1.4 environment

gvm install go1.4
gvm use go1.4
gvm install go1.5.1
quick'n'dirty for linux:
./steamcmd.sh
login anonymous
force_install_dir yourdirectoryhere
app_update 294420 -beta latest_experimental
如果报错
@alexniver
alexniver / golang_http_post.MD
Created November 21, 2016 02:46
golang http post 示例模板
package main

import (
    "bytes"
    "fmt"
    "net/http"
    "net/url"
    "strconv"
)
@alexniver
alexniver / webpack.config.js
Created August 21, 2016 19:18 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
mkdir test1 # dir path must not contine 'react', will cause error
npm init

set info

npm install --save react react-dom redux react-redux immutable
npm install --save-dev webpack babel-loader babel-preset-es2015 babel-preset-react
@alexniver
alexniver / bounded.go
Last active July 24, 2016 12:07
Edit from https://blog.golang.org/pipelines, fan in fan out. show use time.
package main
import (
"crypto/md5"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
//"sort"
package main
import (
"bufio"
"fmt"
"log"
"net/rpc"
"os"
)