Skip to content

Instantly share code, notes, and snippets.

View deqyra's full-sized avatar
💽
the difference between url and irl is u and i

François Brachais deqyra

💽
the difference between url and irl is u and i
View GitHub Profile

This guide explains in broad strokes how to set up C++ tool chains on Windows for usage of all big three compilers with CMake and Ninja through PowerShell. PowerShell is advised because of its customizabilty, which we'll use to conveniently juggle between the different toolchains.

Prerequisites

  • Download and install Ninja.
    Ninja is a build system, its purpose is to run compile commands and keep track of your project files' compilation status, to tell whether they're up-to-date or need recompiling.
    Extract the executable file to a folder and add that folder's path to your system PATH environment variable.
@deqyra
deqyra / .gitconfig
Created April 23, 2024 11:00
Git config file
[diff]
noprefix = false
[core]
pager = less -x1,5
sshCommand = C:/windows/system32/openssh/ssh.exe
whitespace = -trailing-space,-indent-with-non-tab,-tab-in-indent
editor = "C:\\\\Program\\ Files\\\\Sublime\\ Text\\\\subl.exe -w"
[credential]
helper = manager-core
[includeIf "gitdir/i:C:/path/to/somewhere/**"]
@deqyra
deqyra / .clang-format
Last active April 23, 2024 10:56
Clang-format file
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
@deqyra
deqyra / Microsoft.PowerShell_profile.ps1
Last active July 2, 2024 21:39
PowerShell profile script
# Required variables for Oh-my-posh setup
$OMPExe = "$($env:LocalAppData)\Programs\oh-my-posh\bin\oh-my-posh.exe"
$OMPTheme = "$($env:UserProfile)\Documents\PowerShell\emodipt-custom.omp.json"
# Global VS setup info
$VsEdition = 'Community'
$VsSetups = @{
'2022' = @{ 'path' = "C:\Program Files\Microsoft Visual Studio\2022\$VsEdition"; 'gen' = 'Visual Studio 17 2022'; };
@deqyra
deqyra / Tile PDF pages for booklet printing.jsx
Created January 10, 2024 11:49
InDesign script: Tile PDF pages for booklet printing
/**
* Import a PDF file and tile its pages onto an InDesign document.
* The document is duplex-print-ready, and the printed pages can be
* folded in half into a single booklet or several book signatures.
*
* How to install:
* - Launch InDesign
* - Open the Scripts window (Ctrl+Alt+F11)
* - Right-click the "User" folder and select "Reveal in explorer"
* - Place this script inside the folder