Skip to content

Instantly share code, notes, and snippets.


Critter Critter

  • 413-Critter
  • Cary, NC
View GitHub Profile
# Config
echo "---------Starting Wyze Merge at $(date)-----------"
# Assumes there is a camera specific folder with record folder inside it.
# E.g. SRC_DIR/<Camera>/record
echo "Source Directory is $SRC_DIR"
Critter / bootstrap-button-toggle-on-off-switch.markdown
Created Jul 26, 2018
Bootstrap Button Toggle (On/Off Switch)
View bootstrap-button-toggle-on-off-switch.markdown

Bootstrap Button Toggle (On/Off Switch)

Working on a client project that will be using Bootstrap, and needed to build a toggle/switch that came in a couple different sizes. I wasn't seeing that as a built-in option within Bootstrap, and I didn't really like the ones already out there that I found from a quick search (I didn't want to use a plugin, just wanted it to utilize Bootstrap's built-in JS), so I decided to make my own.

This example is just using the default "Quick Add" Bootstrap CSS & JS, no added/custom JS on my part, I've simply utilized Bootstrap's buttons.js Single Toggle method ( and added some custom styling (LESS).

A Pen by Aanjulena Sweet on CodePen.


View bootstrap-vue-toggle-status-switch.markdown
View transmist-mdls-output.txt
Critter:~ critter$ mdls /Applications/
_kMDItemDisplayNameWithExtensions = ""
_kMDItemRenderData = <09000000 407477c0 41000c>
kMDItemAlternateNames = (
kMDItemContentCreationDate = 2018-05-31 21:15:56 +0000
kMDItemContentCreationDate_Ranking = 2018-05-31 00:00:00 +0000
kMDItemContentModificationDate = 2018-06-02 12:56:24 +0000
kMDItemContentType = ""
View include-tickets-partial.php
tribe_get_template_part( 'wootickets/tickets', null, array(
'tickets' => Tribe__Events__Tickets__Tickets::get_all_event_tickets( get_the_ID() )
) );
Critter / ticketsplus_woocommerce-products.php
Created Sep 26, 2017 — forked from theeventscalendar/ticketsplus_woocommerce-products.php
Allows customers to access the WooCommerce product page for tickets with Tickets Plus
View ticketsplus_woocommerce-products.php
* Causes WooCommerce Ticket product pages to stop redirecting to their event page
* See
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 );
Critter / functions.php
Created Sep 26, 2017 — forked from cliffordp/functions.php
Event Tickets Plus and WooCommerce: Set child input based on forced quantity sync with parent input.
View functions.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
* GIF preview:
Critter / func.php
Created Apr 26, 2017
function to add phone number to tickets pro export and split out customer name
View func.php
function attendee_export_add_phone_split_name( $items ) {
$count = 0;
foreach ( $items as &$attendee_record ) {
// Add the header columns
if ( 1 === ++$count ) {
$attendee_record[] = 'First Name';
$attendee_record[] = 'Last Name';
$attendee_record[] = 'Phone';
Critter / Workupload Ad-Block Removal.user.js
Last active Apr 30, 2016
UserScript to remove the Ad-Block Blocking from
View Workupload Ad-Block Removal.user.js
// ==UserScript==
// @name Workupload Ad-Block Removal
// @namespace
// @version 0.8
// @description Removes the sad crying girl that blocks when ad-block is active
// @author Critter
// @match
// @grant none
// @include*
// @include*
Critter / FCPrivateBatteryStatus.m
Created Jan 30, 2016 — forked from marcoarment/FCPrivateBatteryStatus.m
How to get raw battery info (mAh remaining, etc.) from iOS using private APIs. For internal testing only, NOT APP STORE DISTRIBUTION!
View FCPrivateBatteryStatus.m
#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);
You can’t perform that action at this time.