Skip to content

Instantly share code, notes, and snippets.

BasedOnStyle: LLVM
IndentWidth: 8
TabWidth: 8
ContinuationIndentWidth: 16
#UseTab: Always #Don't use w/ AlignConsecutiveAssignments/Declarations
#This option allows spaces for alignment, which works visually in VS and other editors
UseTab: ForContinuationAndIndentation
BreakBeforeBraces: Linux
struct id_item {
char *id;
void *data;
};
void id_item_init(struct id_item* item)
{
item->id = NULL;
item->data = NULL;
}
uniform float4x4 ViewProj;
uniform texture2d image;
uniform float elapsed_time;
uniform float2 uv_offset;
uniform float2 uv_scale;
uniform float2 uv_pixel_interval;
sampler_state textureSampler {
Filter = Linear;
duniform float4x4 ViewProj;
uniform texture2d image;
uniform float elapsed_time;
uniform float2 uv_offset;
uniform float2 uv_scale;
uniform float2 uv_pixel_interval;
sampler_state textureSampler {
Filter = Linear;
#!/user/bin/python
import re, sys, getopt, os
def main(argv):
inputfile = ''
outputfile= ''
try:
opts, args = getopt.getopt(argv, "hi:o",["ifile=","ofile="])
except getopt.GetoptError:
uniform float4x4 ViewProj;
uniform texture2d image;
uniform float elapsed_time;
uniform float2 uv_offset;
uniform float2 uv_scale;
uniform float2 uv_pixel_interval;
sampler_state textureSampler {
Filter = Linear;
@Andersama
Andersama / regex_analysis.hpp
Last active October 3, 2019 05:26
compile time calculation of the least and most amount of characters a regex may match
#pragma once
//requires c++17
//see: https://github.com/hanickadot/compile-time-regular-expressions/blob/master/single-header/ctre.hpp
//specifically: https://github.com/hanickadot/compile-time-regular-expressions/blob/96de8f7a519b61abd4ef53ec37cd89565880aa50/single-header/ctre.hpp
#include <string_view>
#include "ctre.hpp"
namespace regex::analyzer {
//issues w/o unicode (regex fails to compile), these are the (?: .. etc patterns that change how a group capture functions
#include <iostream>
#include <string>
#include <algorithm>
#include <deque>
#include <vector>
#include <array>
#include <set>
#include <thread>
#include <future>
#include <execution>
#pragma once
#include <memory>
#include <functional>
#include <vector>
#include <string>
#include <compare>
#include <array>
#include <type_traits>
#include <intrin.h>
#include <immintrin.h>
#pragma once
#if __has_include(<span>)
#include <span>
#else
#include "span.hpp"
namespace std {
using tcb::span;
}
#endif