Skip to content

Instantly share code, notes, and snippets.

@mgerhardy
mgerhardy / android-packages.cmake
Created October 8, 2015 19:44
CMake android install packages by id - ANDROID_SDK_TOOL is set to the "android" binary
set(ANDROID_SDK_TOOL android)
#
# Install android packages
#
# parameters:
# PACKAGE The package id that you need to install
#
macro(cp_android_package PACKAGE)
message("install android sdk package ${PACKAGE}")
@mgerhardy
mgerhardy / GuiceEasyMockTestNG.java
Created March 1, 2016 07:33
EasyMock + TestNG + Guice class that makes your live easier
package com.github.mgerhardy;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
@mgerhardy
mgerhardy / polyvox-ambient-occlusion.patch
Created June 14, 2016 06:05
Ambient occlusion patch for PolyVox develop branch
From d24f9b9d4c95e148b52ab6cc8dd1d16daa87ba95 Mon Sep 17 00:00:00 2001
From: Martin Gerhardy <martin.gerhardy@gmail.com>
Date: Fri, 20 May 2016 11:52:38 +0200
Subject: [PATCH] implemented ao
---
examples/DecodeOnGPU/decode.vert | 1 +
examples/Paging/main.cpp | 10 +-
examples/common/OpenGLWidget.inl | 1 +
examples/common/PolyVoxExample.h | 14 +-
/**
* @file
*/
#pragma once
#include "compute/Shader.h"
#include "core/Singleton.h"
@mgerhardy
mgerhardy / NoiseShader.cpp
Created August 18, 2017 14:31
Generated c++ code from opencl parser/code generator
/**
* @file
*/
#pragma once
#include "compute/Shader.h"
#include "core/Singleton.h"
#include "core/Assert.h"
#include <glm/gtc/vec1.hpp>
make[1]: Verzeichnis „/home/mgerhardy/dev/mxe“ wird betreten
uname -a
Linux t460s 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux
git log --pretty=tformat:"%H - %s [%ar] [%d]" -1
744f553022aabe5c9946828235b6a5dd9416a6d0 - Update packages.json & build-matrix.html [vor 4 Tagen] [ (HEAD -> master, origin/master, origin/HEAD)]
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Debian
Description: Debian GNU/Linux buster/sid
Release: testing
Codename: buster
@mgerhardy
mgerhardy / svo.hpp
Created June 7, 2020 20:51 — forked from Eisenwave/svo.hpp
C++ implementation of a sparse voxel octree
#ifndef SVO_HPP
#define SVO_HPP
#include "common_types.hpp"
#include "vec.hpp"
#include "vec_math.hpp"
#include "util_bits.hpp"
#include "util_common.hpp"
#include <algorithm>
@mgerhardy
mgerhardy / nextcloud-deployment.yaml.j2
Last active August 26, 2020 19:45
nextcloud-deployment.yaml.j2
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: nextcloud-credentials
stringData:
NEXTCLOUD_ADMIN_USER: {{ nextcloud_admin_user }}
NEXTCLOUD_ADMIN_PASSWORD: {{ nextcloud_admin_password }}
---
apiVersion: apps/v1
@mgerhardy
mgerhardy / agptek.sh
Created December 29, 2020 15:01
APGTEK mp3 player copy bash script - that handles the sorting of files properly (sort by name and by time)
#!/bin/bash
set -e
SOURCE_DIR=$1
TARGET_DIR=$2
DEBUG=${DBG:-0}
function info() {
echo -e "\e[92m$@\e[0m"
@mgerhardy
mgerhardy / achievements.h
Last active March 14, 2021 14:06
AGS: script to generate steam achievements
{
"adateinthepark",
Common::STEAM_ACHIEVEMENTS,
"468530",
{
ACHIEVEMENT_SIMPLE_ENTRY("NEW_ACHIEVEMENT_1_0_PHOTO", "Eye of the Beholder", "Remnants of an enchanting evening..."),
ACHIEVEMENT_SIMPLE_ENTRY("NEW_ACHIEVEMENT_1_1_", "A Friend in Need", "Sometimes we all need some help."),
ACHIEVEMENT_SIMPLE_ENTRY("NEW_ACHIEVEMENT_1_2", "Explorer", "You know this place like the back of your hand!"),
ACHIEVEMENT_SIMPLE_ENTRY("NEW_ACHIEVEMENT_1_3", "An Old Head", "A strange discovery... A?"),