Skip to content

Instantly share code, notes, and snippets.

@gianmaria
gianmaria / build.bat
Last active March 30, 2025 15:18
build.bat
@echo off
setlocal
set mode=%1
if "%mode%"=="debug" (
set optimization=/Od /Zi /MDd
set macro=/D "_DEBUG"
) else if "%mode%"=="release" (
set optimization=/O2 /Zi /MD
@gianmaria
gianmaria / readme.txt
Created April 27, 2024 14:06
cli qt installer
https://github.com/miurahr/aqtinstall
https://aqtinstall.readthedocs.io/en/latest/
@gianmaria
gianmaria / cmd_aliases.bat
Last active March 23, 2025 15:47
aliases for windows cmd
:: copy the full path of this file in the AutoRun value in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
@echo off
doskey cd.. = cd ..
doskey .. = cd ..
doskey home = cd %USERPROFILE%
doskey proj = cd C:\Workspace
doskey ls = dir $*
doskey cat = type $*
@gianmaria
gianmaria / msvc flags.txt
Last active June 7, 2025 20:22
msvc common compiler flags
// complete list: https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category
/Od -> debug
/Zi -> debug info in pdb
/Wall -> enable all warnings
/external:anglebrackets /external:W0 /analyze:external- -> disable warnings for external header
/wdnnnn -> disable specific warning
/EHsc -> Full compiler support for the Standard C++ exception handling (exceptions can only occur at a throw statement or at a function call and functions declared as extern "C" never throw a C++ exception).
@gianmaria
gianmaria / build qt6 windows.md
Last active April 2, 2025 22:47
Build Qt 6 on Windows

Building Qt 6.5 on Windows

Neessary tools

  • cmake
  • ninja
  • python (>= 3.10)
  • node
  • cygwin64
  • git for windows
@gianmaria
gianmaria / howard_hinnant_date_example.cpp
Last active November 6, 2022 12:08
Howard Hinnant date
/*
https://github.com/HowardHinnant/date
https://github.com/HowardHinnant/date/wiki
https://github.com/HowardHinnant/date/wiki/Examples-and-Recipes
https://github.com/HowardHinnant/date/wiki/Boost-datetime-Examples-Translated
https://howardhinnant.github.io/date/date.html
https://howardhinnant.github.io/date/tz.html
*/