Skip to content

Instantly share code, notes, and snippets.

View juliusHuelsmann's full-sized avatar
👻
Focusing

Julius Hülsmann juliusHuelsmann

👻
Focusing
View GitHub Profile
@juliusHuelsmann
juliusHuelsmann / cython_decorator_workaround.py
Created September 1, 2021 14:39
Cython decorator ordering bug workaround
# noinspection PyPep8Naming
class SM(staticmethod):
"""
Quick workaround that allows us to use Cython and multiple decorators.
"""
def __init__(self, *args, **kwargs):
super(staticmethod, self).__init__(*args, **kwargs)
self.__inds_static_hack__ = args[0]
keycode 8 =
keycode 9 = Escape NoSymbol Escape
keycode 10 =
keycode 11 =
keycode 12 =
keycode 13 =
keycode 14 =
keycode 15 =
keycode 16 =
keycode 17 =
@juliusHuelsmann
juliusHuelsmann / picom.conf
Created February 21, 2020 18:19
Picom Configuration (bug report)
###
### Backend settings
###
# Backend to use: "xrender" or "glx" (GLX typically much faster).
backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
@juliusHuelsmann
juliusHuelsmann / conditional_tuple_type.cc
Created February 18, 2020 17:11
Example implementation stripping the last few values of a tuple, expanded in conditional tuple example
// Author: Julius Hülsmann
// Email: juliusHuelsmann [at] gmail.com, julius.huelsmann [at] data-spree.com
// Creation Date: 2020-02-18
// Execution: g++-10.0 -std=c++2a conditional_tuuple_type.cc
// Example implementation stripping the last few values of a tuple, expanded in conditional tuple example
#include <tuple>
@juliusHuelsmann
juliusHuelsmann / indexSequence.cc
Created February 18, 2020 17:01
This snipplet shows how to make use of an index sequence when confined to structs, using the same principle exploited in #untuple.cc
// Author: Julius Hülsmann
// Email: juliusHuelsmann [at] gmail.com, julius.huelsmann [at] data-spree.com
// Creation Date: 2020-02-18
// Execution: g++-10.0 -std=c++2a indexSequence.cc
// This snipplet shows how to make use of an index sequence when confined to structs, using the
// same principle exploited in #untuple.cc
#include <cstdint>
#include <tuple>
@juliusHuelsmann
juliusHuelsmann / untuple.cc
Last active February 24, 2020 13:55
Partial template specialization: This snipplet shows how it is possible to work with the underyling types of a std::tuple.
// Author: Julius Hülsmann
// Email: juliusHuelsmann [at] gmail.com, julius.huelsmann [at] data-spree.com
// Creation Date: 2020-02-18
// Execution: g++-10.0 -std=c++2a untuple.cc
// This snipplet shows how it is possible to work with the underyling types of a std::tuple and
// shows a principle that can be used e.g. in oder to work with an index_sequence.
#include <tuple>
@juliusHuelsmann
juliusHuelsmann / conditional_tuple.hpp
Last active February 18, 2020 17:35
Code snipplet (c++20) for creating conditional tuples; getting a conditional tuple type.
// Author: Julius Hülsmann
// Email: juliusHuelsmann [at] gmail.com, julius.huelsmann [at] data-spree.com
// Creation Date: 2020-02-17
// Execution: g++-10.0 -std=c++2a [FILE]
#include <initializer_list>
#include <tuple>
#include <utility>
//#define EXECUTION consteval //< c++2a
@juliusHuelsmann
juliusHuelsmann / gist:eb544fb0dddd67b0f9e5f05474a20f92
Created February 15, 2020 20:50
gdb backtrace sway with debug symbols
GNU gdb (GDB) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
@juliusHuelsmann
juliusHuelsmann / sway.log
Last active February 15, 2020 20:03
Logfile produced by running `sway -d 2> ~/sway.log`; default config, instant crash (after moving mouse?)
2020-02-15 19:52:40 - [sway/main.c:152] Linux machineBook 5.5.3-arch1-1 #1 SMP PREEMPT Tue, 11 Feb 2020 15:35:41 +0000 x86_64 GNU/Linux
2020-02-15 19:52:40 - [sway/main.c:168] Contents of /etc/os-release:
2020-02-15 19:52:40 - [sway/main.c:152] NAME="Arch Linux"
2020-02-15 19:52:40 - [sway/main.c:152] PRETTY_NAME="Arch Linux"
2020-02-15 19:52:40 - [sway/main.c:152] ID=arch
2020-02-15 19:52:40 - [sway/main.c:152] BUILD_ID=rolling
2020-02-15 19:52:40 - [sway/main.c:152] ANSI_COLOR="0;36"
2020-02-15 19:52:40 - [sway/main.c:152] HOME_URL="https://www.archlinux.org/"
2020-02-15 19:52:40 - [sway/main.c:152] DOCUMENTATION_URL="https://wiki.archlinux.org/"
2020-02-15 19:52:40 - [sway/main.c:152] SUPPORT_URL="https://bbs.archlinux.org/"