Skip to content

Instantly share code, notes, and snippets.

@aleksasiriski
aleksasiriski / proxmoxlxcjellyfin.md
Last active October 15, 2024 19:02
Proxmox LXC Alpine Docker Jellyfin

How to setup VA-API within Proxmox LXC Unprivileged container

Proxmox configuration

No drivers need to be installed on the proxmox, from now called host.

Find GIDs of video and render group on host:

cat /etc/group | grep video

cat /etc/group | grep render

@bearlike
bearlike / clear_systemd_journal_logs.md
Created March 8, 2022 07:59
Clear Systemd Journal Logs in Ubuntu 20.04

Clear Systemd Journal Logs in Ubuntu 20.04

Systemd has its own logging system called the journal, and the log files are stored in /var/log/journal.

Check current disk usage of journal files

sudo journalctl --disk-usage

Rotate journal files

  • Active journal files will be marked as archived, so that they are never written to in future.
#!/bin/bash
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Must run on Proxmox VE 7 server
# Not sure how to handle a cluster - either run on each node or copy template after creating on one?
# e.g. $ ssh [email protected] < proxmox-create-cloud-template.sh
SRC_IMG="https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img"
@WoozyMasta
WoozyMasta / create-container-registry-proxies.sh
Last active February 18, 2025 23:55
Create multiplie container registry cache proxies using docker distribution in registry mirror mode
#!/bin/bash
set -eu
# Listen address for all docker.io/registry instances
listen_address=0.0.0.0
# Listen port for the first container
# all subsequent ports for containers will be incremented by one
listen_port_first=5000
insecure=true
@qrtt1
qrtt1 / 00-ITHOME 2021 鐵人賽-觀戰區.md
Last active August 2, 2024 14:39
ITHome 第 13 屆鐵人賽 (updated UTC 2021-11-07 10:14:45.317902)
@nikp123
nikp123 / Armbian USB gadget guide.md
Last active February 2, 2025 20:49
How to make a USB gadget on Armbian Linux

This guide will include a step-by-step guide on how to set up an board running Armbian to act as a gadget device (similar to how it's been advertized with the Pi Zero)

Prerequisites

You will need a:

  • Armbian supported board with an OTG port
  • A temporary spare monitor, USB keyboard and display cable (or serial, if you'd like that instead)
  • USB cable
@dhh
dhh / pagination_controller.js
Last active December 17, 2024 11:10
HEY's Stimulus Pagination Controller
/*
ERB template chunk from The Feed's display of emails:
<section class="postings postings--feed-style" id="postings"
data-controller="pagination" data-pagination-root-margin-value="40px">
<%= render partial: "postings/snippet", collection: @page.records, as: :posting, cached: true %>
<%= link_to(spinner_tag, url_for(page: @page.next_param),
class: "pagination-link", data: { pagination_target: "nextPageLink", preload: @page.first? }) unless @page.last? %>
</section>
@uenoB
uenoB / README.en.md
Last active November 14, 2023 17:20
How to set up QEMU working properly on M1 Mac

English | Japanese

How to set up QEMU working properly on M1 Mac

Last-Update: June 8, 2021.

This document describes how to run Windows 10 for ARM and Linux operating systems properly on Apple Silicon (M1) Mac by using open source software only. The combination of [QEMU] and [Alexander Graf's Hypervisor.framework support patch][Alexander Graf's patch] allows us to run Windows 10 and Linux for 64-bit ARM processors on M1 Mac efficiently. Several webpages such as [How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac] and [QEMU on M1 Mac] describe how to set up a QEMU environment with Alex's patch. While they are helpful for the first trial, additional effort is needed to realize a proper QEMU environment that can be used for our daily business.

@HendrikHaase
HendrikHaase / proxmox-add-thermal-stats-to-summary.md
Last active July 20, 2023 14:09
proxmox add thermal stats to summary

proxmox add thermal stats to summary

apt install lm-sensors


open file

nano /usr/share/perl5/PVE/API2/Nodes.pm

@zulhfreelancer
zulhfreelancer / kubectl-apply-stdin.md
Last active October 9, 2024 22:06
How to run "kubectl apply -f" with inline YAML as stdin?
$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF

OR

$ cat file.yaml | kubectl apply -f -