Skip to content

Instantly share code, notes, and snippets.

@sircharlo
sircharlo / immich-orphan-cleaner.py
Last active April 1, 2024 14:40
I modified @T-One 's excellent Gist somewhat for my purposes: I had alot of orphaned files in my Immich instance! I was getting impatient and wanted to see progress and ETA. Here it is in case anyone is impatient like me lol; all credit goes to @T-One though. Original Gist: https://gist.github.com/T-One/c857005e58286149914ad38f24a891e1
#!/usr/bin/env python3
# Note: you might need to run "pip install halo tabulate tqdm" if these dependencies are missing on your machine
import argparse
import json
import requests
from datetime import datetime
from halo import Halo
@champsupertramp
champsupertramp / Ultimate Member 2.1 - Add search & reset buttons in member directory
Last active April 28, 2024 02:34
Ultimate Member 2.1 - Add search & reset buttons in member directory
<?php
add_action("um_members_directory_head","um_custom_members_directory_head",10, 1 );
function um_custom_members_directory_head( $args )
{
?>
<div class="um-search-submit" style="margin:auto;width:50%;">
<div style="width: 40%;float:left;margin:10px;text-align:center;">
<a href="#" class="um-button um-do-search" ><?php _e("Search","ultimate-member"); ?></a>
</div>
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Scripts
*
* @since 1.0
@champsupertramp
champsupertramp / gist:d13302363caa36f2ae8a9281208d5b12
Last active February 14, 2023 14:37 — forked from ultimatemember/gist:5f725bff6bcf79d2988e
Ultimate Member 2.0 - Real-time notification - Add custom notification type
/*
This code sample shows you how to use the API to create
and add custom notifications (for real-time notifications)
plugin.
STEP 1: You need to extend the filter: um_notifications_core_log_types with your
new notification type as follows for example
*/
@czachor
czachor / wp_usermeta.md
Last active June 30, 2021 08:24 — forked from magnific0/wp_usermeta.md
Show and Edit User Meta in Wordpress

Show and Edit User Meta in WordPress (works with UltimateMember)

Description

This simple procedure will allow you to:

  1. Display user meta fields under in the user list as additional columns (Users > All Users).
  2. Display these fields on user profiles.
  3. Edit these fields under user edit.

This method works completely without plugins and involves just some functions and hooks in functions.php. Plugins like "User Meta Display" achieve this to some level, but treat custom meta fiedlds completely different from the regular fields. They are shown and edited in seperate environment and fail to show the meta data is a table list. This method integrates custom user meta along with regular user (meta).

@1activegeek
1activegeek / healthchecks.sh
Last active May 19, 2022 13:53
Healthchecks.io Bash Script
#!/bin/bash
## Checks get listed here as variables with a call to their respective command
## Sub token with Organizr API token
radarr=$(curl -o /dev/null -s -w "%{http_code}\n" -H "token: token" https://domain.com/radarr)
sonarr=$(curl -o /dev/null -s -w "%{http_code}\n" -H "token: token" https://domain.com/sonarr)
ombi=$(curl -o /dev/null -s -w "%{http_code}\n" -H "token: token" https://domain.com/requests)
plex=$(curl -L -o /dev/null -s -w "%{http_code}\n" -H "token: token" https://domain.com/plex)
domain=$(curl -o /dev/null -s -w "%{http_code}\n" -H "token: token" https://domain.com/)
@nikitasinelnikov
nikitasinelnikov / hide current user from all member directories
Created December 1, 2017 10:48
Ultimate Member Hide current user profile from Member Directory using Hooks
add_filter( 'um_prepare_user_query_args', 'um_remove_current_user_from_list', 100, 2 );
function um_remove_current_user_from_list( $query_args, $args ) {
if ( is_user_logged_in() ) {
if ( ! empty( $query_args['exclude'] ) )
$query_args['exclude'] = array_merge( $query_args['exclude'], array( get_current_user_id() ) );
else
$query_args['exclude'] = array( get_current_user_id() );
}
return $query_args;
@poripa
poripa / sp-gallery.php
Created January 8, 2017 09:09
Ultimate Member Gallery: Hide the Gallery Tab on the profile page of specific roles
@ultimatemember
ultimatemember / gist:78aac8b268b2c75489f0
Last active September 13, 2022 11:58
Apply your own custom validation to a field
/*
In this code sample, you can learn how to apply custom
validations on any fields you want.
This can be done using these steps:
1. Edit the field in backend (field modal)
2. Where it asks for field validation choose "Custom"
3. Enter a unique validation action name e.g. my_8numbers
@pryley
pryley / UltimateMembersMods
Created May 4, 2015 22:45
This Wordpress plugin adds custom features and modifications to the Ultimate Member plugin family.
<?php
/**
* Plugin Name: Ultimate Member Modifications
* Plugin URI: http://geminilabs.io
* Description: This plugin adds custom features and modifications to the Ultimate Member plugin family.
* Version: 1.0.0
* Author: Gemini Labs
* Author URI: http://geminilabs.io
* License: MIT License
*/