Skip to content

Instantly share code, notes, and snippets.

View erikzenker's full-sized avatar
🤖
lost in the tunnel

Erik Zenker erikzenker

🤖
lost in the tunnel
View GitHub Profile
@erikzenker
erikzenker / AwesomeGestures.md
Last active January 24, 2025 17:36
OSX like gesture for arch linux onn awesome windowmanager

This is a manual for OSX like touchpad gestures on arch linux for the awesome window manager. It describes how to trigger awesome actions on swiping with three fingers on the touchpad.

  • Install libinput dependencies pacaur -S sf86-input-libinput libinput-gestures

  • Add current user to input group sudo gpasswd -a $USER input

@erikzenker
erikzenker / meta_class_cookbook.cpp
Created October 3, 2018 18:30
C++ MetaClass CookBook
// API Documentation was created based on the presentation of Herb Sutter on CppCon 2018:
// https://www.youtube.com/watch?v=80BZxujhY38
// and the original propsal:
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0707r3.pdf
// and test from the implementation repo
// https://github.com/asutton/clang/tree/095a810d0514ccc9b3ea66c546a2adc7384449ca/test/CXX/meta
// Create a meta class
template <typename T>
constexpr void meta_class(T source){
@erikzenker
erikzenker / boost_hana_cookbook.md
Last active July 1, 2021 18:31
Boost Hana Cookbook

Boost Hana Cookbook

All receipies use the following include and namespace:

#include <boost/hana.hpp>
namespace bh = boost::hana;

Best Practice

  • use make_basic_tuple over make_tuple since a basic_tuple is more compile time efficient.

Clang Compile Time Cookbook

In this cookbook I will discuss several techniques to reduce the compile time of the llvm frontend clang. I will put the focus on heavy template and constexpr code.

Clang Tools Pipeline

First it is important to understand the internals of clang. Clang is a collection of tools which are pipelined.

Preprocessor

  • Performs the actions of the C preprocessor
  • The command line option -E stops clang after this stage

DIY Solar Power System

In this document I want to describe my progress building an own solar load controller.

Problem

There exist a lot of solar load controller which you can use to build a simple solar power system. Usualy, these load controller do not provide open and well documented interfaces to access data such as:

  • Solar panel voltage/current
  • Battery voltage
  • Consumer current