Skip to content

Instantly share code, notes, and snippets.

View bbenno's full-sized avatar
🍁
How we perceive a problem can change every time we see it.

Benno Bielmeier bbenno

🍁
How we perceive a problem can change every time we see it.
  • OTH Regensburg
  • Bavaria
View GitHub Profile
@bbenno
bbenno / mimir.yaml
Created June 27, 2024 19:29
"one-file" configuraiton of Grafana Mimir v2.12.x including default values. See also https://grafana.com/docs/mimir/latest/configure/configuration-parameters/
# Comma-separated list of components to include in the instantiated process. The
# default value 'all' includes all components that are required to form a
# functional Grafana Mimir instance in single-binary mode. Use the '-modules'
# command line flag to get a list of available components, and to see which
# components are included with 'all'.
# CLI flag: -target
#target: "all"
# When set to true, incoming HTTP requests must specify tenant ID in HTTP
# X-Scope-OrgId header. When set to false, tenant ID from -auth.no-auth-tenant
@bbenno
bbenno / loki.yaml
Last active June 27, 2024 19:17
"one-file" configuraiton of Grafana Loki v3.0.x including default values.
# A comma-separated list of components to run. The default value 'all' runs Loki
# in single binary mode. The value 'read' is an alias to run only read-path
# related components such as the querier and query-frontend, but all in the same
# process. The value 'write' is an alias to run only write-path related
# components such as the distributor and compactor, but all in the same process.
# Supported values: all, compactor, distributor, ingester, querier,
# query-scheduler, ingester-querier, query-frontend, index-gateway, ruler,
# table-manager, read, write. A full list of available targets can be printed
# when running Loki with the '-list-targets' command line flag.
# CLI flag: -target
@bbenno
bbenno / plot_base_json.R
Created April 29, 2021 18:03
base.json Visualisation
library(tidyverse)
library(jsonlite)
library(here)
save_plot <- function(...) ggsave(width = 7, height = 5, ...)
data <- here("base.json") %>%
fromJSON() %>%
`[[`("thread") %>%
map2(names(.), function(thread, thr_name) {
@bbenno
bbenno / pdf2txt.rb
Last active February 4, 2021 13:04 — forked from emad-elsaid/pdf2txt.rb
PDF to Text converter using ruby
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'pdf/reader'
# credits to :
# https://github.com/yob/pdf-reader/blob/master/examples/text.rb
# usage example:
# ruby pdf2txt.rb /path-to-file/file1.pdf [/path-to-file/file2.pdf..]
ARGV.each do |filename|
@bbenno
bbenno / ADR_template.adoc
Created January 31, 2021 18:12
Architecture Decision Record

Problem Title: Decision

Note
Status

[ pending | decided | approved | deprecated | superseeded | …​ ]

Decision by

Responsible Person

Date

2020-06-27

@bbenno
bbenno / commands.tex
Last active November 16, 2020 15:31
DQCO LaTeX commands
% Import essential packages
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
% Define common constructs
\newcommand{\cat}[1]{|#1\rangle}
\newcommand{\bra}[1]{\langle#1|}
\newcommand{\bracat}[2]{\langle#1|#2\rangle}
\newcommand{\sqav}[1]{\big|#1\big|^2} % square of the absolute value
#!/usr/bin/python
"""linear_program.py: Solves an simple integer linear program.
Maximize
f(x) = 6x₁ + 4x₂
with
x₁, x₂ ∈ ℕ
@bbenno
bbenno / Makefile
Created August 26, 2020 13:01
Makefile for IAR Embedded Workbench Projects using `iarbuild`
PROJ_NAME=<...>
PROJ_FILE=$(PROJ_NAME).ewp
IAR_FLAGS = -log info
IAR_FLAGS += -parallel 4
CONFIG=*
# Brings the current build configuration up to date by compiling, assembling,
# and linking only the files that have changed since the last build.
@bbenno
bbenno / cheatsheet-latex.md
Last active August 20, 2020 12:00
Cheatsheet LaTeX

LaTeX Cheatsheet

Abbreviation Definition
pt A point, is the default length unit. About 0.3515mm
mm a millimetre
cm a centimetre
in an inch
ex the height of an x in the current font
em the width of an m in the current font
@bbenno
bbenno / listings-glsl.prf
Last active November 6, 2023 12:12
LaTex Listings: GLSL Language
%% Copyright (c) 2020-2021 Benno Bielmeier
%% SPDX-License-Identifier: MIT
%%
%% GLSL definition
%%
\lstdefinelanguage{GLSL}%
{%
morekeywords={%
% HLSL constants
false,FALSE,NULL,true,TRUE,%