Skip to content

Instantly share code, notes, and snippets.

@augustin-laurent
augustin-laurent / rocm_arch_guide.md
Last active December 8, 2025 09:43
ROCm Installation guide on Arch
Date of the guide : September, 2025

Introduction

In this post, I will provide the solution that worked on my system on how to install Radeon Open Compute (ROCm) on Arch (linux-6.6.7.arch1-1) for RX 6900 XT (Should work on other 6000 series). ROCm is an open-source software platform that allows GPU-accelerated computation. This tool is a prerequist to use GPU Acceleration on TensorFlow or PyTorch. In this guide I will use Paru as my AUR package helper, feel free to use any other (https://wiki.archlinux.org/title/AUR_helpers). I will assume you have a working operating system and know what you do with it (Otherwise Arch will be painfull for you).

@nielsvanvelzen
nielsvanvelzen / jf-dev-auth.md
Last active November 27, 2025 14:12
Jellyfin API Authorization

Jellyfin API Authorization

To start using the Jellyfin API, authorization is probably the first thing you'll need to do. Jellyfin's authorization options can be a bit confusing because there are a lot of deprecated options.

Generally there are three ways to authenticate: no authorization, user authorization with an access token or authorization with an API key. The first way is easy, just do nothing. But most often you'll need to use either the access token or API key.

Sending authorization values

There are multiple methods for transmitting authorization values, however, some are outdated and scheduled to be removed. It's recommend to use the Authorization header. If header auth isn't an option, the token may be sent through the ApiKey query parameter. Sending secure data in a query parameter is unsafe as the changes of it leaking (via logs, copy-paste actions or by other means) are high. Only use this method as a last resort.

@imjp94
imjp94 / build.gd
Last active June 7, 2025 13:38
Build script to help exporting Godot project.
tool
extends SceneTree
const PLATFORM_ANDROID = "Android"
const PLATFORM_HTML5 = "HTML5"
const PLATFORM_IOS = "iOS"
const PLATFORM_LINUX = "Linux/X11"
const PLATFORM_MAC = "Mac OSX"
const PLATFORM_UWP = "UWP"
const PLATFORM_WINDOWS = "Windows Desktop"
@LingDong-
LingDong- / ln.c
Last active May 20, 2025 07:31
simple, fast, accurate natural log approximation without <math.h>
// ln.c
//
// simple, fast, accurate natural log approximation
// when without <math.h>
// featuring * floating point bit level hacking,
// * x=m*2^p => ln(x)=ln(m)+ln(2)p,
// * Remez algorithm
// by Lingdong Huang, 2020. Public domain.
@NickNaso
NickNaso / cpp.yml
Created June 3, 2020 23:55
Example of Github action for C++ rpoject
# This is a basic workflow to help you get started with Actions
# workflow - цепочка действий
# Имя процесса Билдится на всех типах 📦 🐍
name: CMake Build Matrix
# Controls when the action will run. Triggers the workflow on push
on:
push:
pull_request:
release:
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h> /* of course */
#include <X11/Xutil.h> /* duuuh */
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h> /* obviously */
@Apfelin
Apfelin / STTBot.py
Last active June 9, 2025 18:13
Discord speech-to-text bot, made with discord.py by Rapptz and voice additions by imayhaveborkedit. Uses wit.ai for speech recognition
import discord
import asyncio
import speech_recognition as sr
from threading import Thread
# bot token and wit.ai api key
TOKEN = ""
WIT_AI_KEY = ""
# we need a sink for the listen function, so we just define our own
@Redchards
Redchards / Platform.hxx
Created November 28, 2015 08:23
Simple definition file to ease multi-platform compilation in C++
#ifndef PLATFORM
#define PLATFORM
#define GCC_COMPILER 1
#define MVSC_COMPILER 2
#define ICC_COMPILER 3
#define BORLAND_COMPILER 4
#define LINUX 1
#define WINDOWS 2
@mazurio
mazurio / gist:5092dc53bd4a4db956a1
Created April 19, 2015 17:52
Basic SDL2 Template
#include <iostream>
#include <SDL.h>
using namespace std;
int main() {
if(SDL_Init(SDL_INIT_VIDEO) != 0) {
std::cout << "SDL_Init Error: " << SDL_GetError() << std::endl;
return 1;