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 / 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
/*
* 将大数字转换为粗精度的汉字单位数字,以缩短字符串显示长度
* number <Number> 要转换的数字
* separator <String> 数字和单位之间的分隔字符,默认为空格
*
* return <String> 转换后的字符串
*/
export default {
toDelimitedString: (number, separator = ' ', decimal = 1) => {
let retStr = ''
@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/
@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 / .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 / dots.csv
Created October 10, 2018 07:24
dots.csv
label ccode region pop qu de ar aq lng lat arid capacity delivery
Buenaventura COL 6 248 3 3 3 1 -77.025 3.862 6.233 3.32 2193
Sebha LBY 1 54 1 2 1 1 14.462 27.004 0.004 0.36 6319
Dongola SDN 1 167 4 4 4 1 30.461 19.184 0.004 6.96 404
Merowe SDN 1 177 2 4 3 1 31.848 18.563 0.009 2.24 404
Nouadhibou MRT 1 75 3 4 3 1 -17.035 20.844 0.01 2.58 689
AsSuways EGY 1 304 1 3 2 1 32.477 29.847 0.013 0.77 2158
al_Asir_mir_Ramadan EGY 1 78 2 3 2 1 31.758 30.275 0.015 1.94 1515
Berber SDN 1 144 4 4 4 1 33.996 18.029 0.018 14.11 486
Tamenghest DZA 1 69 1 3 2 1 5.521 22.788 0.024 0.96 3261
@mogita
mogita / bust_a_groove_2_faq_for_playstation.txt
Created January 15, 2019 17:37
Bust A Groove 2 FAQ for PlayStation
Originally found at
https://gamefaqs.gamespot.com/ps/196847-bust-a-groove-2/faqs/4975
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\ \\
\\ Bust A Move 2: Dance Tengoku Mix \\
\\ \\
\\ FAQ Ver. 1.0 \\
\\ \\
@mogita
mogita / keybase.md
Last active September 22, 2019 08:06
keybase.md

Keybase proof

I hereby claim:

  • I am mogita on github.
  • I am mogita (https://keybase.io/mogita) on keybase.
  • I have a public key ASCOZGQa9HhO2oTSonjM-cK4KD0mwaMESyLnSJ4ARb6u_go

To claim this, I am signing this object:

@mogita
mogita / index.d.ts
Last active October 22, 2019 10:59
[WIP] Evergreen UI Type Definitions
/* tslint:disable:interface-name max-classes-per-file no-empty-interface */
declare module 'evergreen-ui' {
import * as React from 'react';
type PositionTypes = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
type IntentTypes = 'none' | 'success' | 'warning' | 'danger';
type IconNameTypes =
''
| 'loading'
apiVersion: v1
kind: Service
metadata:
name: keycloak
labels:
app: keycloak
spec:
ports:
- name: http
port: 8080