Skip to content

Instantly share code, notes, and snippets.

@cryptoluks
cryptoluks / paperless_unlock_pdf.py
Last active August 3, 2025 18:03
Pre-consume hook for Paperless-ngx. This script checks if a PDF is password-protected, then tries a list of passwords from a dictionary file to unlock it. When successful, it saves the PDF with a deterministic ID so duplicate detection remains accurate.
#!/usr/bin/env python3
import os
import sys
import pikepdf
def log(message):
# Simple logging function; stdout and stderr are captured by Paperless-ngx
print(message)
@dannberg
dannberg / obsidian-daily-note-template.txt
Last active December 8, 2025 03:23
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@maxaudron
maxaudron / backup.sh
Last active July 22, 2025 20:13
Make backups and clean up old ones using the grandfather-father-son principle
#!/bin/bash
# Make backups and clean up old ones using the grandfather-father-son principle
#
# Keeps one backup per four weeks ( roughly one per month ) for a year
# per week for four weeks
# per day for one week
#
# DRYRUN="yes" BACKUP_CONTEXT="/home/user" backup.sh BACKUP_SRC BACKUP_DEST
#
# DRYRUN: when set nothing is actually done, useful for testing
@cr105ph1nx
cr105ph1nx / oracle-18c-xe-installation-on-archlinux.md
Created November 4, 2021 10:38
Guide to installing Oracle 18c Database Express Edition on an Archlinux host (November 2021)

Oracle 18c XE Installation Guide On Archlinux Host

Important Disclaimer: Read the entirety of the guide first before engaging in the installation process. Don’t skip any parts unless you know what you’re doing! If you have any questions, you are free to contact me. This is a beginner's guide so the purpose is to break down and explain each step in details so if you think this guide lacks information, feel free to write an issue to let me know.

Clone git repository

git clone https://aur.archlinux.org/oracle-xe.git
cd oracle-xe
@rometsch
rometsch / BH456A_linux_driver.md
Last active July 20, 2025 00:02
MPOW BH456A Bluetooth USB Adapter Kernel Module Adjustements (Realtek RTL8761B chip)

Problem

The MPOW Bluetooth 5 dongle (Model: BH456A) does not work out of the box on Ubuntu 20.04 (kernel 5.4.0-42).

Solution

Patch the bluetooth kernel module and copy the firmware binaries to /lib/firmware.

Copy the fimware

@davidmaignan
davidmaignan / installation_oracle_xe_archlinux.md
Last active February 25, 2025 15:26
Basic installation for oracle-xe on archlinux

Clone git repository

git clone https://aur.archlinux.org/oracle-xe.git
cd oracle-xe

Download oracle-xe-rpm.zip

wget http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
@AndrewRadev
AndrewRadev / LICENSE
Last active March 20, 2024 14:25
Execute a vim motion on the "next" text object
MIT License
Copyright (c) 2017 Andrew Radev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: