Skip to content

Instantly share code, notes, and snippets.

@sanjacob
sanjacob / download.py
Created March 11, 2024 22:03
Download all the animated emojis from Google Noto Emoji
# Copyright (C) 2024 by sanjacob
# Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
# DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
# OR PERFORMANCE OF THIS SOFTWARE.
@sircharlo
sircharlo / immich-orphan-cleaner.py
Last active May 3, 2024 01:36
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
@freakshock88
freakshock88 / play_plex_media_using_assist.yaml
Last active January 27, 2025 07:39
play_plex_media_using_assist.yaml
blueprint:
name: Play Plex media using Assist
description: >
Play any Plex media on a media player of your choice.
The media player has to support this action.
domain: automation
input:
media_player:
name: Media player
description: Media player on which to start Plex playback
@Blackshome
Blackshome / smart-light.yaml
Last active March 23, 2025 15:28
smart-light.yaml
blueprint:
name: Smart Light
description: >
# 🔆 Smart Light
**Version: 2.8**
Smart Lighting: Your Lights, Your Way - Take Control and Customize it to Perfection!💡✨
@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;