Skip to content

Instantly share code, notes, and snippets.

View vbaderks's full-sized avatar

Victor Derks vbaderks

  • Nijmegen, The Netherlands
  • 09:10 (UTC +02:00)
View GitHub Profile
@nathancorvussolis
nathancorvussolis / wix-v5-bootstrap-download-vcredist-sample.wxs
Last active April 27, 2025 16:03
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 May 1, 2025 18:05
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 February 19, 2025 20:54
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 May 14, 2025 08:53
Visual C++ Redistributable Packages
@jtbr
jtbr / endianness.h
Last active October 11, 2024 19:08
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

@zdeslav
zdeslav / ATLCPImplMT.hpp
Last active June 23, 2018 10:14
IConnectionPoint implementation with multithreading support for ATL projects. It marshals the client interfaces to the sender thread via GIT. Based on Microsoft KB article 280512
// This is a supplement to the Active Template Library 3.0.
// Copyright (C) 2000 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended for illustration.
#ifndef __CPIMPLMT_H__
#define __CPIMPLMT_H__
#include <atlcom.h>