Skip to content

Instantly share code, notes, and snippets.

View kpatdev's full-sized avatar

Kishan Patel kpatdev

View GitHub Profile
@kpatdev
kpatdev / Dockerfile
Created February 28, 2025 21:50 — forked from rickxz/Dockerfile
Adminer MongoDB docker image
FROM adminer:4.8.0
# WATCH OUT WHEN UPGRADING, THE SED BELOW MIGHT STOP WORKING
USER root
RUN apk add autoconf gcc g++ make libffi-dev openssl-dev
RUN pecl install mongodb
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini
# MongoDB allows connections without password.
# But that doesn't fly with Adminer which prints 'Database does not support password.' for such case.
@kpatdev
kpatdev / plex_empty_trash.py
Last active October 23, 2024 16:41
Empty Trash on Plex but check if NFS mounts are active before doing so (
import os
from plexapi.server import PlexServer
# Replace with your actual Plex server details
PLEX_URL = 'http://<plex_server_ip>:32400'
PLEX_TOKEN = '<plex_x_token>'
MOUNT_PATH = '/mnt/nfs'
FOLDERS = ['movies', 'tvshows', 'homevideos', 'youtube']
def check_folders():