Skip to content

Instantly share code, notes, and snippets.

View Windows Add to Right Click Context Menu.bat
@echo off
set context=%1
set app_name=%~2
set app_title=%~3
set app_icon=%~4
set app=%~5
set arguments=%~6
set location=HKEY_CLASSES_ROOT
@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.