Skip to content

Instantly share code, notes, and snippets.

@xphir
xphir / userChrome.css
Created June 29, 2025 09:41
Firefox hide native vertical tab bar if Sidebery is enabled
/*
Credit: https://gist.github.com/abhinav/00c2053b750b72e2d43bcf1652b5fb66
This is a userChrome.css for Firefox
that hides the vertical tab sidebar (used by Sidebery),
but only if Sidebery is enabled and the window title contains the "sidebery" preface.
Instructions:
1. Enable userChrome.css support and vertical tabs in Firefox:
1.1 Go to about:config
1.2 Set `toolkit.legacyUserProfileCustomizations.stylesheets` to `true`
@JonnyWong16
JonnyWong16 / select_tmdb_poster.py
Last active March 11, 2026 12:38
Selects the default TMDB poster and art for items in a Plex library if no poster/art is selected or the current poster/art is from Gracenote.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Description: Selects the default TMDB poster and art for items in a Plex library
if no poster/art is selected or the current poster/art is from Gracenote.
Author: /u/SwiftPanda16
Requires: plexapi
Usage:
* Change the posters for an entire library:
@ryanburnette
ryanburnette / Caddyfile
Last active February 10, 2026 01:32
Caddy v2.1+ CORS whitelist
(cors) {
@cors_preflight{args.0} {
method OPTIONS
header Origin {args.0}
}
handle @cors_preflight{args.0} {
header {
Access-Control-Allow-Origin "{args.0}"
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
@tomtastic
tomtastic / smb.conf
Last active January 27, 2025 13:27
Samba 4.13.5 config for MacOS Monterey
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
@jbfriedrich
jbfriedrich / nsmb.conf
Last active March 8, 2026 06:40
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
# Use Plain Text Mode as Default in TextEdit
defaults write com.apple.TextEdit RichText -int 0
# TimeMachine backup per 30 min. (Broken)
# sudo defaults write /System/Library/Launch Daemons/com.apple.backupd-auto StartInterval -int 1800
# use this if SSD
sudo pmset -a sms 0
# Finder option
defaults write NSGlobalDomain AppleShowAllExtensions -bool true # Show All Extensions in Finder
@protrolium
protrolium / ffmpeg.md
Last active March 13, 2026 07:55
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: