Skip to content

Instantly share code, notes, and snippets.

@nielsvanvelzen
nielsvanvelzen / jf-dev-auth.md
Last active May 6, 2024 03:07
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.

@unraze
unraze / elegoo_neptune_3.def.json
Created August 24, 2022 03:45
Official Elegoo Neptune 3 Cura Machine Profile
{
"version": 2,
"name": "ELEGOO NEPTUNE 3",
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"author": "ELEGOO",
"manufacturer": "ELEGOO",
"category": "ELEGOO",
"file_formats": "text/x-gcode",
@palewire
palewire / README.md
Last active May 7, 2024 02:29
How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

Here's how I configured a GitHub Action so that a new version issued by GitHub's release interface will build a Dockerfile, tag it with the version number and upload it to Google Artifact Registry.

Before you attempt the steps below, you need the following:

  • A GitHub repository that contains a working Dockerfile
  • The Google Cloud SDK tool gcloud installed and authenticated

Create a Workload Identity Federation

@donaldpipowitch
donaldpipowitch / README.md
Last active November 13, 2023 22:08
Rewrite relative import paths with a codemod

⚠️ This is for an internal project, but shared publicly as a reference for myself.

If you want to have a general introduction how to write such a codemod have a look at this Gist from me.

What to do?

Place the usage.js and prettiermod.js in the root of the project. Run:

$ pnpm add globby@^11.0.0 @babel/traverse
@Anduh
Anduh / ScreenMonitor.sh
Created April 3, 2021 20:29 — forked from fatguytyson/ScreenMonitor.sh
Screen watcher for Linux Mint Immersed (dis)connect.
#! /bin/bash
OUTPUT_NAME="DVI-I-2-2"
OUTPUT_MODE="1920x1080"
OUTPUT_LOCATION="--right-of DP-1-3"
LOG_DIR="~/.Immersed/Logs"
agent_started() {
pgrep Immersed &> /dev/null 2>&1
return $?
@ralex
ralex / seventeentrack.j2
Created December 7, 2020 20:48
17track template for Home Assistant
{% set status = [
{
"sensor": "seventeentrack_packages_not_found",
"icon": "mdi:timer-sand-empty"
},
{
"sensor": "seventeentrack_packages_expired",
"icon": "mdi:restore-alert"
},
{
@andrebrait
andrebrait / keychron_linux.md
Last active April 25, 2024 13:24
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@hmanzur
hmanzur / Dockerrun.aws.json
Last active January 31, 2022 15:25
Beanstalk Environments to Docker container build in .env file
{
"AWSEBDockerrunVersion": "1",
"Logging": "/tmp/app",
"Image": {
"Update": "true"
}
}
@Xaero252
Xaero252 / Moved.md
Last active May 26, 2019 02:17
Enable nvdec support for plex dockers on unraid