Skip to content

Instantly share code, notes, and snippets.

Colton C Ward Triavanicus

Block or report user

Report or block Triavanicus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Triavanicus
Triavanicus / GLFW.cmake
Last active Mar 4, 2019
Downloads GLFW from git, and adds a glfw target that one can include in their project
View GLFW.cmake
include(ExternalProject)
set(GLFW_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
if(NOT EXISTS ${GLFW_DIR})
file(MAKE_DIRECTORY ${GLFW_DIR})
endif()
if(NOT EXISTS ${GLFW_DIR}/include)
file(MAKE_DIRECTORY ${GLFW_DIR}/include)
@Triavanicus
Triavanicus / gen_cc.sh
Created Jan 23, 2019
I created a bash script that used sed to convert CMake's compile_commands.json into a .clang_complete file
View gen_cc.sh
#!/bin/bash
usage() {
echo "Cmake commands to clang complete generator usage:"
echo "$0 input/directory [output/directory]"
}
generate_file() {
cat $1/compile_commands.json |
sed -r '/command/!d
s/^ *"command": "//
View gfm.py
import re
from hashlib import md5
from markdown import markdown
def gfm(value):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(matchobj.group(0).encode('utf-8')).hexdigest()
extractions[digest] = matchobj.group(0)
You can’t perform that action at this time.