Skip to content

Instantly share code, notes, and snippets.

View jochumdev's full-sized avatar
🥰
Released go-orb v0.3.0 :)

René Jochum jochumdev

🥰
Released go-orb v0.3.0 :)
View GitHub Profile
@jochumdev
jochumdev / LICENSE
Last active April 16, 2025 07:07
ocis->oc decomposed rewrite mpack
Copyright 2025 Rene Jochum
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRU
---
###############################################################
# Authelia configuration #
###############################################################
identity_validation:
reset_password:
jwt_secret: {{ secret "/config/secrets/identity_validation_reset_password_jwt_secret" }}
default_redirection_url: https://public.example.com
@jochumdev
jochumdev / how-to-use-golang-framer.go
Last active October 8, 2022 12:48 — forked from ilyaigpetrov/how-to-use-golang-framer.go
How To Use Golang Framer?
// This is based on https://github.com/nghttp2/nghttp2/blob/master/integration-tests/server_tester.go
package main
import (
"bytes"
"crypto/tls"
"errors"
"fmt"
"log"
"net"
Code Name HTTP Mapping
0 OK 200 OK
1 CANCELLED 499 Client Closed Request
2 UNKNOWN 500 Internal Server Error
3 INVALID_ARGUMENT 400 Bad Request
4 DEADLINE_EXCEEDED 504 Gateway Timeout
5 NOT_FOUND 404 Not Found
6 ALREADY_EXISTS 409 Conflict
7 PERMISSION_DENIED 403 Forbidden
@Qix-
Qix- / coro.cpp
Created September 29, 2020 04:16
C++20 coroutines + LibUV sample, v2
// Thank you to the folks at the C++ slack channel,
// along with @lewissbaker for the excellent literature
// (even though it took me a few days to be convinced
// it really was so).
#include <uv.h>
#include <iostream>
#include <experimental/coroutine>
@looopTools
looopTools / Read File to std::vector<uint8_t> in C++
Created February 1, 2019 13:33
How to read a file from disk to std::vector<uint8_t> in C++
inline std::vector<uint8_t> read_vector_from_disk(std::string file_path)
{
std::ifstream instream(file_path, std::ios::in | std::ios::binary);
std::vector<uint8_t> data((std::istreambuf_iterator<char>(instream)), std::istreambuf_iterator<char>());
return data;
}
@miguelmota
miguelmota / uint8_to_hex.cpp
Last active February 26, 2025 03:31
C++ uint8_t to hex string
#include <sstream>
#include <iostream>
#include <iomanip>
std::string uint8_to_hex_string(const uint8_t *v, const size_t s) {
std::stringstream ss;
ss << std::hex << std::setfill('0');
for (int i = 0; i < s; i++) {
import QtQuick 2.9
import QtQuick.Controls 2.2
Column {
width: parent.width
height: parent.height
property alias model: columnRepeater.model
ListView {
@ejahandar
ejahandar / IteratorBenchmark.cpp
Created March 14, 2018 17:49
A Benchmark for Qt's Vector/List/Map iterators vs simple arrays
#include <QDateTime>
#include <QMap>
#include <QVector>
#include <QList>
#include <QDebug>
#define SIZE 10000000
int array[SIZE];
int main(){
@lsv
lsv / README.md
Last active May 4, 2024 17:05
KNP Menu Bundle - Bootstrap 4 and Font Awesome 4