Skip to content

Instantly share code, notes, and snippets.

View jakoch's full-sized avatar
💭
😎 #include <Berlin.h> #include <C++>

Jens A. Koch jakoch

💭
😎 #include <Berlin.h> #include <C++>
View GitHub Profile
@jakoch
jakoch / cpuinfo.cmake
Last active August 3, 2023 22:56
cpu feature detection using embedded C++ with output to JSON for CMake
# Jens A. Koch, MIT License, 2023-08-04
# This CMake script will build and run a CPUID utility.
# It detects processor features and writes a cpuinfo.json file,
# containing cpu vendor, brand, isa-features and architecture level.
#
# The variable CPUINFO_OK is set in case of a successful compilation and run.
# If successful, we can read the json file, check each feature
# and set CMAKE variables accordingly, e.g. HAS_SSE42, HAS_AVX2, HAS_AVX512.
#
@jakoch
jakoch / Dockerfile-vcpkg.txt
Last active July 20, 2023 13:29
setup vcpkg in docker container
# +-----------------------------+
# | vcpkg ~225MB|
# +-----------------------------+
#
# replaced by devcontainer.feature: ghcr.io/msclock/features/vcpkg:1
#
# https://github.com/microsoft/vcpkg/blob/master/README.md#quick-start-unix
@jakoch
jakoch / gtest_to_junit.xml
Created January 13, 2023 18:41
gtest_to_junit.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, Jens A. Koch.
License: BSL-1.0, see https://opensource.org/licenses/BSL-1.0
Usage Github Actions with Powershell to transform googletest results of standalone executables:
- name: ♻ Transform Test Results (gtest ➔ junit)
working-directory: build-dbg
shell: pwsh
@jakoch
jakoch / Graphics and Engine development.md
Created June 30, 2022 13:38 — forked from rtryan98/Graphics and Engine development.md
Talks, Posts, Papers and more for Graphics and (Game) Engine Development
@jakoch
jakoch / installer.iss
Created March 20, 2016 23:39
InnoSetup Uninstall by deleting the application folder
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
// warn the user, that his working folder is going to be deleted and projects might get lost
if (CurUninstallStep = usUninstall) then begin
if MsgBox('***WARNING***'#13#10#13#10 +
'The installation folder is [ '+ ExpandConstant('{app}') +' ].'#13#10 +
'You are about to delete this folder and all its subfolders,'#13#10 +
'including [ '+ ExpandConstant('{app}') +'\important_projects_folder ], which may contain your projects.'#13#10#13#10 +
@jakoch
jakoch / unzip.iss
Created August 28, 2015 10:34
Unzip Helper for executing 7zip without blocking the InnoSetup GUI
{
Unzip Helper for executing 7zip without blocking the InnoSetup GUI
----
The main procedure is the non-blocking Unzip().
Your GUI will remain responsive during the unzip operation.
Written by Rik and Jens A. Koch (@jakoch) on StackOverflow:
http://stackoverflow.com/questions/32256432/how-to-execute-7zip-without-blocking-the-innosetup-ui
@jakoch
jakoch / appveyor.yml
Created July 10, 2021 17:29
appveyor build script for an ttauri based application
#-------------------------------------------------------------------
# AppVeyor build configuration
# https://www.appveyor.com/docs/
# https://www.appveyor.com/docs/appveyor-yml/
#-------------------------------------------------------------------
clone_depth: 5
version: '{build}'
@jakoch
jakoch / Versioning.cmake
Created July 3, 2021 13:52
cmake versioning based on GIT version control infos
#
# Versioning
#
# Usage:
#
# include(Versioning.cmake)
#
#-------------------------------------------------------------------
@jakoch
jakoch / highlightjs-webworker.html
Created July 18, 2016 17:49
Highlight multiple chunks of code by using WebWorkers and Highlight.js
<html>
<head>
<title>highlight.js Code by using WebWorkers</title>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/github.min.css">-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css">
<script>
function highlight_code()
{
if (typeof (Worker) === undefined)
@jakoch
jakoch / build-static-qt.ps1
Created October 29, 2014 13:36
Build static version of Qt (Windows)
#-----------------------------------------------------------------------------
#
# Copyright (c) 2013, Thierry Lelegard
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.