Skip to content

Instantly share code, notes, and snippets.

View mogita's full-sized avatar
🏡
Working remotely

Yun Wang mogita

🏡
Working remotely
View GitHub Profile
@mogita
mogita / .vimrc
Created August 10, 2018 09:19
my .vimrc
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')
Plugin 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
@mogita
mogita / index.html
Created October 30, 2017 06:31
微信前端登录万能跳转页
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>微信登录</title>
</head>
<body>
<script>
var GWC = {
urlParams: {},
@mogita
mogita / README.md
Created September 7, 2017 08:18 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
/*
* 将大数字转换为粗精度的汉字单位数字,以缩短字符串显示长度
* number <Number> 要转换的数字
* separator <String> 数字和单位之间的分隔字符,默认为空格
*
* return <String> 转换后的字符串
*/
export default {
toDelimitedString: (number, separator = ' ', decimal = 1) => {
let retStr = ''
@mogita
mogita / gist:c3528c5229479c8e02d85bc3f96010ef
Created June 1, 2017 08:02 — forked from craigminihan/gist:b23c06afd9073ec32e0c
Build GCC 4.9.2 for C/C++ on CentOS 7
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install