This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: brown; icon-glyph: bookmark; | |
// Useful links | |
// https://en.wikipedia.org/api/rest_v1/#/Feed/aggregatedFeed | |
// https://design.wikimedia.org/blog/2021/04/26/bringing-wikipedia-to-the-homescreen-on-ios.html | |
// https://design.wikimedia.org/blog/assets/uploads/wikipedia-widget/wikipedia-top-read-widget.png | |
const PREFS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SIMPLE CALENDAR BOILERPLATE | |
* this is not meant to be a stantalone widget but to be a starter template to jumpstart your calendar widget (or any widget with a calendar). | |
* dates can be difficult to work with, so this template is here to make it easier | |
*/ | |
/* | |
* BASE WIDGET STYLING | |
* change the below variables to customize your calendar style | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* This could easily be something that is added to the admin as a plugin so that users can | |
* add searchable fields in an options table | |
* @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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: orange; icon-glyph: quote-right; | |
// Change these to your usernames! | |
const user = "spencer" | |
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E" | |
const telegram = "realSpencerWoo" | |
const github = "spencerwooo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const API_URL = "https://www.purpleair.com/json?show="; | |
// const CACHE_FILE = "aqi_data.json" | |
// Find a nearby PurpleAir sensor ID via https://fire.airnow.gov/ | |
// Click a sensor near your location: the ID is the trailing integers | |
// https://www.purpleair.com/json has all sensors by location & ID. | |
let SENSOR_ID = args.widgetParameter || "4896" | |
async function getSensorData(url, id) { | |
let req = new Request(`${url}${id}`) | |
let json = await req.loadJSON() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Config | |
echo "---------Starting Wyze Merge at $(date)-----------" | |
SRC_DIR=/cameras/WyzeCams | |
# Assumes there is a camera specific folder with record folder inside it. | |
# E.g. SRC_DIR/<Camera>/record | |
TGT_DIR=/cameras/Archive | |
TMP_DIR=/tmp/wyze_merge | |
echo "Source Directory is $SRC_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
tribe_get_template_part( 'wootickets/tickets', null, array( | |
'tickets' => Tribe__Events__Tickets__Tickets::get_all_event_tickets( get_the_ID() ) | |
) ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Causes WooCommerce Ticket product pages to stop redirecting to their event page | |
* See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
*/ | |
function tribe_wootix_no_hijack() { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
$woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Event Tickets Plus and WooCommerce: | |
* Set child input based on forced quantity sync with parent input. | |
* | |
* You need to edit the product IDs (1129 parent and 1128 child in this example code) | |
* | |
* From https://gist.github.com/cliffordp/5a769159a2bf64f0b1b1dbbde243d109 | |
* GIF preview: https://cl.ly/1F1N0h211b1w | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#include <dlfcn.h> | |
NSDictionary *FCPrivateBatteryStatus() | |
{ | |
static mach_port_t *s_kIOMasterPortDefault; | |
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options); | |
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT); | |
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name); |
NewerOlder