Skip to content

Instantly share code, notes, and snippets.

View vbaderks's full-sized avatar

Victor Derks vbaderks

  • Nijmegen, The Netherlands
  • 17:09 (UTC +01:00)
View GitHub Profile
@nathancorvussolis
nathancorvussolis / wix-v5-bootstrap-download-vcredist-sample.wxs
Last active November 3, 2025 15:48
WiX v4/v5 - Visual C++ 2015-2022 Redistributable - 14.40.33810
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<Bundle
Name="Example Product"
Version="1.2.3.4"
Manufacturer="John Doe"
Copyright="© 2023 John Doe"
AboutUrl="https://example.net/"
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active December 12, 2025 18:48
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@seanmiddleditch
seanmiddleditch / cplusplus-enum-members.md
Last active November 25, 2024 11:16
Meta-Proposal for Enum Member Functions

Meta-Proposal for Enum Member Functions

Problem

Enums today cannot provide any custom behavior via member functions. Behavior for enumeration types must be provided by traits classes or namespace-scope operator overloads and functions.

For some uses of enums, such as opaque ID wrapper or flags types, the inability to introduce hidden friend functions poisons the namespace scope of the enum (resulting in worse diagnostic and build times). Typically, custom operations and extension points should be defined as hidden friends to improve the experience of C++ developers using the type.

Consider:

@mikestecker
mikestecker / optimising-unifi-performance.md
Last active November 21, 2025 11:50
optimising-unifi-performance

optimising-unifi-performance

NOTE: Content below is written by Adrian Mace. Click here for an updated version.

Below are the key settings that I apply on any unifi installation for optimal performance.

Settings

Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.
@ChuckMichael
ChuckMichael / vcredistr.md
Last active December 10, 2025 22:20
Visual C++ Redistributable Packages
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 13, 2025 13:43
Conventional Commits Cheatsheet
@jtbr
jtbr / endianness.h
Last active October 14, 2025 08:31
cross-platform / cross-compiler standalone endianness conversion
/**
* @file endianness.h
* @brief Convert Endianness of shorts, longs, long longs, regardless of architecture/OS
*
* Defines (without pulling in platform-specific network include headers):
* bswap16, bswap32, bswap64, ntoh16, hton16, ntoh32 hton32, ntoh64, hton64
*
* Should support linux / macos / solaris / windows.
* Supports GCC (on any platform, including embedded), MSVC2015, and clang,
* and should support intel, solaris, and ibm compilers as well.
@BrukerJWD
BrukerJWD / iwyu.ps1
Created November 8, 2016 05:58
Wrapper for include-what-you-use which inspects all cpps
param(
[string]$Dir = ".",
[string]$Filter = "*.cpp"
)
$ErrorActionPreference = "Stop"
$iwyu = "\path\to\bin\include-what-you-use.exe"
@vurdalakov
vurdalakov / strings.h
Created September 30, 2016 02:26
std::string to std::wstring conversion (and vice versa) using Windows API
#pragma once
#include <windows.h>
#include <string>
inline std::wstring multi2wide(const std::string& str, UINT codePage = CP_THREAD_ACP)
{
if (str.empty())
{
return std::wstring();
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active March 12, 2025 19:23
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII