Skip to content

Instantly share code, notes, and snippets.

@ntwb
ntwb / ntwb_bbpress_topic_reply_wp_search_results.php
Created September 26, 2014 07:13
bbPress - Include Topics and Replies in WordPress Search Results
<?php
/*
Plugin Name: bbPress - Include Topics and Replies in WordPress Search Results
Plugin URI: https://gist.github.com/ntwb/7363a1de1184d459f0c3
Description: bbPress - Include Topics and Replies in WordPress Search Results
Version: 0.1
Author: Stephen Edgar - Netweb
Author URI: http://netweb.com.au
*/
@jonnyvaughan
jonnyvaughan / custom-search-acf-wordpress.php
Last active January 30, 2021 15:51 — forked from charleslouis/custom-search-acf-wordpress.php
Search filter to search on specified ACF fields and custom taxonomies.
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
@niemyjski
niemyjski / description.md
Last active June 8, 2023 15:33
Report Home Assistant Battery Levels With Node-RED

I decided to share this snippet based on seeing what others were doing in this thread: https://www.reddit.com/r/homeassistant/comments/emvk9y/how_do_you_monitor_sensor_battery_levels_looking/

Basically dome device types of battery report the state in different locations and with different string values that the change node or conditional logic just doesn't work nicely. Using the conditional logic on this string state value might not be working fully how we think it is or at least didn't for me. When I was debugging it and getting 10 outputted in a 100 bucket via the gt condition. The best way I've found to handle these conditions is with a function node.

Home Assistant Feedback

@22phuber
22phuber / dynamic-dns-update-aws-route53.sh
Last active October 5, 2022 03:55
Dynamic DNS update for AWS Route 35
#!/usr/bin/env bash
# Refactored by: Patrick Huber (22phuber@gmail.com)
# Description: Digs the current external Ipv4 and compares it to a Ipv4 locally stored in a file.
# If the ips differ, aws cli is used to update a route 53 dns record with the new Ipv4.
# This script only supports Ipv4.
# Original script source:
# - https://willwarren.com/2014/07/03/roll-dynamic-dns-service-using-amazon-route53/
# Dependencies:
# - awscli # install AWS cli: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
@balloob
balloob / demo-strategy.js
Last active May 19, 2022 20:57
Demo Lovelace strategy for Home Assistant
/*
Demo strategy that shows each area as a tab. Each tab shows the area entities.
To use:
- store this file in `<config>/www/demo-strategy.js`
- Add lovelace resource: `/local/demo-strategy.js`, type JavaScript Module
- Create a new Lovelace dashboard and set as content:
strategy:
name: 'custom:balloob-demo'
@sstratoti
sstratoti / actionable-notifications-subflow-for-ios.md
Last active April 15, 2024 00:49
iOS Subflow for HomeAssistant Companion notifications