Skip to content

Instantly share code, notes, and snippets.

test status

Jesse Aldridge JesseAldridge

test status
Block or report user

Report or block JesseAldridge

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
codediodeio / database.rules.json
Last active Nov 13, 2019
Common Database Rules for Firebase
View database.rules.json
// No Security
"rules": {
".read": true,
".write": true
XVilka /
Last active Nov 13, 2019
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
mikaelz / delete-all-woocommerce-products.php
Last active Nov 4, 2019
Remove all WooCommerce products from database via SQL
View delete-all-woocommerce-products.php
require dirname(__FILE__).'/wp-blog-header.php';
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')");
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'");
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)");
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')");
harperreed /
Created Feb 17, 2018
EMFIT QS Sleep tracker location API


There is a functional http server running on the device that can be crawled for realtime data. It runs on port 80 and uses plain http.

You will need to know the IP address if your emfit device.


For demoing / testing with a web browser there is an auto-refreshing page that contains only HR and RR values, it’s name is shortdvm.htm

benatkin / Global.sublime-settings
Created Jul 20, 2011
excluding node_modules from Sublime Text 2
View Global.sublime-settings
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
EdenK / elementor-video-youtube-enablejsapi.php
Last active Sep 4, 2019
Filter to add enablejsapi to Elementor youtube video
View elementor-video-youtube-enablejsapi.php
* Filter to add enablejsapi to Elementor youtube video
function add_youtube_jsapi($iframe_html, $video_url, $frame_attributes) {
if(strpos($video_url, 'youtube') !== false) {
$src = esc_attr($frame_attributes['src']);
$new_src = esc_attr(add_query_arg(array('enablejsapi' => '1'), $frame_attributes['src']));
$iframe_html = str_replace($src, $new_src, $iframe_html);
devinsays / customer-new-account.php
Created Oct 3, 2017
Sends new WooCommerce customers an account email that with their email address as a login rather than a username.
View customer-new-account.php
* Customer new account email
* This template has been overriden to change account creation text.
* @see
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 1.6.4
woogists / wc-create-coupon-programatically.php
Last active Jul 24, 2019
[General Snippets] Create a coupon programatically
View wc-create-coupon-programatically.php
* Create a coupon programatically
$coupon_code = 'UNIQUECODE'; // Code
$amount = '10'; // Amount
$discount_type = 'fixed_cart'; // Type: fixed_cart, percent, fixed_product, percent_product
$coupon = array(
'post_title' => $coupon_code,
'post_content' => '',
View gist:216120
¦-) as opposed to |
⍥ om nom nom
pch /
Last active Feb 18, 2019
How to install Unison on Mac OS El Capitan & Vagrant

How to install Unison on Mac OS El Capitan & Vagrant - for Docker Sync

You can install Unison on the Mac via homebrew (brew install unison), but it's very likely that it won't work properly, resulting in errors like:

Unison failed: Uncaught exception Failure("input_value: bad bigarray kind")
Fatal error: Lost connection with the server
You can’t perform that action at this time.