Skip to content

Instantly share code, notes, and snippets.

View cpei-avalara's full-sized avatar

Chunsheng Pei cpei-avalara

View GitHub Profile
@cpei-avalara
cpei-avalara / .ycm_extra_conf.py
Created January 18, 2018 20:30
.ycm_extra_conf.py with clang system includes
import os
import re
import subprocess
import ycm_core
def LoadSystemIncludes():
regex = re.compile(ur'(?:\#include \<...\> search starts here\:)(?P<list>.*?)(?:End of search list)', re.DOTALL);
process = subprocess.Popen(['clang', '-v', '-E', '-x', 'c++', '-'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE);
process_out, process_err = process.communicate('');
output = process_out + process_err;
@cpei-avalara
cpei-avalara / benchmark.cpp
Created December 23, 2017 03:14 — forked from anonymous/benchmark.cpp
The C++ Integer To String Conversion Benchmark
/*
*******************************************************************************
* The C++ Integer To String Conversion Benchmark *
* *
* Version: 2.718-20131130 *
* *
* This benchmark is based on the solutions provided in the following *
* stackoverflow question: *
* *
* http://stackoverflow.com/q/4351371 (Date: 20101204) *