Skip to content

Instantly share code, notes, and snippets.

@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
@gabrielbidula
gabrielbidula / pint.sh
Last active December 18, 2024 19:01
fake laravel pint formatter mode
#!/bin/bash
# Check if an argument was provided
if [ $# -eq 0 ]; then
echo "No file path provided."
exit 1
fi
# Use the provided argument (file path)
file="$1"
@hegerdes
hegerdes / cloud-init-default.yml
Last active February 27, 2025 13:16
Hetzner Packer
#cloud-config
ssh_pwauth: false
disable_root_opts: no-port-forwarding,no-agent-forwarding,no-X11-forwarding
# Install base packages
package_update: true
package_upgrade: true
packages:
- gnupg

[guide] keycloak authentication for proxmox

How to setup Proxmox to use Keycloak as authentication realm.

Proxmox Setup

root@proxmox:/etc/pve# cat domains.cfg
pam: pam
        comment Linux PAM standard authentication
@Anon-Exploiter
Anon-Exploiter / .zshrc
Created September 17, 2020 12:31
.zshrc of Kali Linux 2020.3 including the lit prompt
# ~/.zshrc file for zsh non-login shells.
# see /usr/share/doc/zsh/examples/zshrc for examples
setopt autocd # change directory just by typing its name
#setopt correct # auto correct mistakes
setopt interactivecomments # allow comments in interactive mode
setopt ksharrays # arrays start at 0
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
setopt nonomatch # hide error message if there is no match for the pattern
setopt notify # report the status of background jobs immediately
@markasoftware
markasoftware / enterprise_token.rb
Last active May 16, 2025 13:39
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 12, 2025 11:23 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@hbirchtree
hbirchtree / CMakeLists.txt
Last active December 11, 2021 09:08 — forked from fracek/CMakeLists.txt
CMake, GTK+ 3 and AppImage
# Set the name and the supported language of the project
PROJECT(hello-world C)
# Set the minimum version of cmake required to build this project
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
### We need this in order to find CMake modules located in this directory
set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} )
include ( LinuxAppImageBuild )
@kwk
kwk / CMakeLists.txt
Created February 9, 2015 13:37
Use boost from Git repo together with CMake External Project
project(regex)
cmake_minimum_required(VERSION 2.8)
# For some external project macros
include(ExternalProject)
# Download boost from git and build regex module
ExternalProject_Add(
@zguangyu
zguangyu / serial.cpp
Created January 24, 2015 11:59
C++ serial port reader
#include <cstring>
#include <cerrno>
#include <cstdio>
#include <iostream>
#include <deque>
#include <vector>
#include <thread>
#include <mutex>
#include <chrono>