Skip to content

Instantly share code, notes, and snippets.

@ironicbadger
ironicbadger / alexs-results
Last active September 11, 2024 19:21
results
#######
## These results are still open to the public. See
## https://blog.ktz.me/the-best-media-server-cpu-in-the-world/
## for analysis of them.
# https://github.com/ironicbadger/quicksync_calc
# zoidberg - dell 7040 sff pc
CPU TEST FILE BITRATE TIME AVG_FPS AVG_SPEED AVG_WATTS
i5-6600T h264_1080p_cpu ribblehead_1080p_h264 18952 kb/s 116.352s 29.88 1.04x N/A
@ChenyangGao
ChenyangGao / alist.sh
Last active July 15, 2024 07:05
在服务器部署alist和clouddrive(原来只支持openwrt,现在已通用)
#!/usr/bin/env bash
# current_shell_rcfile() {
# if [ -n "$BASH_VERSION" ]; then
# printf "%s\n" ~/.bashrc
# elif [ -n "$ZSH_VERSION" ]; then
# printf "%s\n" ~/.zshrc
# elif [ -n "$FISH_VERSION" ]; then
# printf "%s\n" ~/.config/fish/config.fish
# elif [ -n "$XONSH_VERSION" ]; then
@geerlingguy
geerlingguy / stable-diffusion-ubuntu-2004-amd.sh
Last active March 15, 2024 06:52
Install Stable Diffusion on an AMD GPU PC running Ubuntu 20.04
# Note: This will only work on Navi21 GPUs (6800/6900+).
# See: https://github.com/RadeonOpenCompute/ROCm/issues/1668#issuecomment-1043994570
# Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers)
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh
# follow the prompts to install it, and run `conda` to make sure it's working.
# Install git and curl, and clone the stable-diffusion repo
sudo apt install -y git curl
@mr-karan
mr-karan / deployment.hcl
Last active December 26, 2023 10:30
Single Node nomad and consul
job "hello-world" {
datacenters = ["dc1"]
namespace = "default"
type = "service"
group "redis" {
# Specify number of replicas of redis needed.
count = 1
# Specify networking for the group, port allocs.
@aleksasiriski
aleksasiriski / proxmoxlxcjellyfin.md
Last active April 5, 2024 17:45
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

#!/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 root@proxmox.server < 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 March 6, 2024 08:11
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
Created August 3, 2021 10:04
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)
@dhh
dhh / pagination_controller.js
Last active September 5, 2024 17:46
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>