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 / 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 / block-csgo-matchmaking-servers.md
Created May 18, 2020 17:47
Block all CS:GO MatchMaking Servers (allow only Amsterdam, Frankfurt, London, Luxemburg, Vienna)

Block all CS:GO MatchMaking Servers (allow only Amsterdam, Frankfurt, London, Luxemburg, Vienna)

IPs are taken from github.com/SteamDatabase/SteamTracking/Random/NetworkDatagramConfig.json

Add Firewall Rule to lock servers

netsh advfirewall firewall add rule name="csgo-mm-servers-block" dir=out action=block remoteip=18.162.88.34/32,34.85.12.153/32,34.85.40.62/32,34.85.47.228/32,34.212.218.15/32,42.81.120.140/32,42.81.120.141/32,42.81.120.142/32,42.81.120.143/32,42.81.120.144/32,42.81.120.145/32,61.182.135.15/32,61.182.135.16/32,61.182.135.18/32,61.182.135.72/32,103.10.124.40/32,103.10.124.43/32,103.10.124.44/32,103.10.124.45/32,103.10.124.99/32,103.10.124.100/32,103.10.124.101/32,103.10.124.102/32,103.10.125.146/32,103.10.125.154/32,103.10.125.162/32,111.32.164.141/32,111.32.164.142/32,111.32.164.143/32,111.32.164.144/32,111.32.164.145/32,111.32.164.146/32,116.211.132.11/32,116.211.132.12/32,116.21
@jakoch
jakoch / smf_auth.py
Created May 9, 2019 14:13
Authenticate Trac (bugtracker) users against Simple Machines Forum
#!/usr/bin/python
# Authenticate Trac (bugtracker) users against Simple Machines Forum
# Author: Derek Anderson
# Date: 29-01-2008
# Source: http://armyofevilrobots.com/auth_trac_against_smf
try:
from mod_python import apache
except:

Keybase proof

I hereby claim:

  • I am jakoch on github.
  • I am jakoch (https://keybase.io/jakoch) on keybase.
  • I have a public key ASAPK6mQNUPQNqGpZYH-5u5DLyn9FfRX5K4dPDr7OEyR0Qo

To claim this, I am signing this object:

@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)