This file contains hidden or 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
# Uninstall.cmake adds an uninstall target to remove previously installed files, | |
# it had been adapted from the CMake FAQ at the link. | |
# https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake | |
# | |
# Copy Uninstall.cmake to a directory on the CMAKE_MODULE_PATH, then include the | |
# module using: include(Uninstall) | |
message(STATUS "Uninstall target enabled") | |
file(WRITE ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake "\ |
This file contains hidden or 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
" fresh palette | |
let g:airline#themes#fresh#palette = {} | |
" NORMAL mode | |
let s:N1 = ['#005f00', '#afdf00', 22, 148, ''] | |
let s:N2 = ['#ffffff', '#444444', 255, 238, ''] | |
let s:N3 = ['#ffffff', '#121212', 15, 233, 'bold'] | |
let s:W = ['#000000', '#8700df', 232, 92, ''] | |
let s:E = ['#000000', '#990000', 232, 160] | |
let g:airline#themes#fresh#palette.normal = |
This file contains hidden or 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
if(UNIX) | |
string(REPLACE "-DNDEBUG" "" | |
CMAKE_C_FLAGS_RELEASEASSERT ${CMAKE_C_FLAGS_RELEASE}) | |
string(REPLACE "-DNDEBUG" "" | |
CMAKE_CXX_FLAGS_RELEASEASSERT ${CMAKE_CXX_FLAGS_RELEASE}) | |
elseif(WIN32) | |
string(REPLACE "/D NDEBUG" "" | |
CMAKE_C_FLAGS_RELEASEASSERT ${CMAKE_C_FLAGS_RELEASE}) | |
string(REPLACE "/D NDEBUG" "" | |
CMAKE_CXX_FLAGS_RELEASEASSERT ${CMAKE_CXX_FLAGS_RELEASE}) |
This file contains hidden or 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
#!/usr/bin/python | |
from __future__ import print_function | |
def main(): | |
from argparse import ArgumentParser | |
from platform import system | |
from subprocess import Popen, PIPE | |
from sys import stderr |
This file contains hidden or 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
"" Add NOTE comment highlighting to C/C++ files | |
" Place this file in ~/.vim/after/c.vim | |
" This syntax matchesku the word NOTE | |
syn keyword cNote contained NOTE | |
" This add the cNote syntax keyword to the cCommentGroup cluster, so it only | |
" shows up in comments | |
syn cluster cCommentGroup contains=cTodo,cNote,cBadContinuation | |
" This links the syntax matcher to the highlight group Note | |
hi def link cNote Note |
This file contains hidden or 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
# This file is NOT licensed under the GPLv3, which is the license for the rest | |
# of YouCompleteMe. | |
# | |
# Here's the license text for this file: | |
# | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any |
This file contains hidden or 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
# This file is a minimal clang-format sublime-integration. To install: | |
# - Change 'binary' if clang-format is not on the path (see below). | |
# - Put this file into your sublime Packages directory, e.g. on Linux: | |
# ~/.config/sublime-text-2/Packages/User/clang-format-sublime.py | |
# - Add a key binding: | |
# { "keys": ["ctrl+shift+c"], "command": "clang_format" }, | |
# | |
# With this integration you can press the bound key and clang-format will | |
# format the current lines and selections for all cursor positions. The lines | |
# or regions are extended to the next bigger syntactic entities. |
This file contains hidden or 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
#include <stdio.h> | |
void takes_int_reference(int &i) { i = 42; } | |
// Trivial wrapper example, a more appropriate use would be to wrap a resource | |
// which requires R.A.I.I. for safe usage. | |
class int_wrapper { | |
private: | |
int i; | |
public: |
This file contains hidden or 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
<snippet> | |
<description>Sublime Snippet</description> | |
<content><![CDATA[<snippet> | |
<description>$1</description> | |
<content><![CDATA[${TM_FILENAME/(.+)\..+|.*/$1/:name}$2]$NOT_DEFINED]></content> | |
<tabTrigger>${TM_FILENAME/(.+)\..+|.*/$1/:name}</tabTrigger> | |
<scope>$0</scope> | |
</snippet>]]></content> | |
<tabTrigger>snippet</tabTrigger> | |
<!-- <scope>$0</scope> --> |
This file contains hidden or 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
#include <iostream> | |
#include <cassert> | |
unsigned operator"" _b(const char *str) | |
{ | |
unsigned ret = 0; | |
for(size_t i = 0; i < str[i] != '\0'; ++i) { | |
char digit = str[i]; | |
assert(digit == '0' || digit == '1' && "Binary literal's only support 0 or 1"); | |
ret = ret * 2 + (digit - '0'); |
NewerOlder