Skip to content

Instantly share code, notes, and snippets.

@mattdy
mattdy / .traefik-cloudflare-tunnel
Last active November 15, 2025 20:12
Traefik on Docker Swarm accessed via Cloudflare Tunnel
Please see https://mattdyson.org/blog/2024/02/using-traefik-with-cloudflare-tunnels for a detailed write-up of this configuration
@mihirk284
mihirk284 / Install_OpenCV4_CUDA10.md
Last active March 20, 2025 19:30 — forked from raulqf/Install_OpenCV4_CUDA12.6_CUDNN8.9.md
How to install OpenCV 4.4 with CUDA 11.3 in Ubuntu 20.04

How to install OpenCV 4.4.0 with CUDA 11.3 in Ubuntu distro 20.04

First of all install update and upgrade your system:

    sudo apt update
    sudo apt upgrade

Then, install required libraries:

The use of the I2C DS3231/3232 from Armbian SBC has a few quirks, most tutorials on the internet works but only if you have internet connection.
In cuba we can sometimes use Armbian on devices that are not internet connected, so most tutorial fails and after a power failure or reboot you get a non working system because some apps/soft warns and fail with a "date in the future" message.
I have crafted a way to use it as a real systemd service (yes, it's a legacy service...)
Create a file named: rtc_ds1307 in /etc/init.d/ you can use the command below (root privileges are required)
```
nano /etc/init.d/rtc_ds1307
@markasoftware
markasoftware / enterprise_token.rb
Last active December 12, 2025 20:39
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
@plembo
plembo / RPIwithQEMU.md
Last active October 9, 2025 02:52
Emulating a Raspberry Pi with QEMU

Emulating a Raspberry Pi with QEMU

Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).

The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.

A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.

@AkdM
AkdM / Edit_Repack_ISO_tutorial.md
Last active November 10, 2025 13:38
Edit and repack .iso bootable image

On Linux

Installing mkisofs

apt-get install mkisofs

Editing ISO image

mkdir /tmp/custom_iso

@johnliu55tw
johnliu55tw / asyncio_socket_server.py
Last active January 25, 2025 15:26
Python asyncio socket server template
import asyncio
import logging
# XXX: REMOVE THIS LINE IN PRODUCTION!
logging.basicConfig(format='%(asctime)s %(lineno)d %(levelname)s:%(message)s', level=logging.DEBUG)
logger = logging.getLogger(__name__)
# Connected client records
clients = dict()
@Jekins
Jekins / Markdown-docs.md
Last active November 29, 2025 23:25
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@Iman
Iman / clean.sh
Last active November 29, 2025 04:06
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/usr/bin/env bash
# Ubuntu Server or VM Cleaner. Safe by default; aggressive when asked.
# Example safe: sudo ./clean.sh
# Example aggressive: sudo JOURNAL_DAYS=3 AGGRESSIVE=1 ./clean.sh
# Enable Docker image prune (images only): sudo ./clean.sh --docker-images
# Tested on Ubuntu 20.04, 22.04, 24.04 (server/VM images).
set -Eeuo pipefail
trap 'rc=$?; echo "Error on line $LINENO: $BASH_COMMAND (exit $rc)"; exit $rc' ERR
IFS=$'\n\t'