Skip to content

Instantly share code, notes, and snippets.

@matthewelmer
matthewelmer / Makefile
Last active September 22, 2023 08:21
simpler makefile
# MIT License
#
# Copyright (c) 2023 Matthew Elmer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@Ghost-VR
Ghost-VR / header.code-snippets
Last active June 5, 2024 00:20 — forked from coffeenotfound/h.code-snippets
Visual Studio Code Snippet: C/C++ Header Guard; Auto Include
{
"Add include guard": {
"prefix": "guard",
"description": "Adds an ifndef include guard to a C/C++ header",
"body": [
"#ifndef __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__",
"#define __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__",
"",
"$0",
"",