Skip to content

Instantly share code, notes, and snippets.

Looking for work in the Seattle, WA or remote areas.

Brian J King brianjking

Looking for work in the Seattle, WA or remote areas.
View GitHub Profile
OttoWinter /
Last active May 19, 2019
Lovelace Migration Script

Home Assistant Lovelace Migrator

Do you want to try out this experimental (!) new lovelace UI stuff in Home Assistant but don't want to migrate your entire configuration? This script is here to help! It reads in your Home Assistant configuration (specifically the group: section) and creates a matching ui-lovelace.yaml file in your Home Assistant configuration folder (of course backing up any previous file at that path).

To use this script, you first need to have python and home assistant installed where you plan to run this script. Do so using virtual environments and the pip3 install -U homeassistant command. Then copy below file to (any location should work) and run:

woogists / wc-export-custom-field-data.php
Created Mar 9, 2018
[ShipStation] Export Custom Field Data to ShipStation
View wc-export-custom-field-data.php
// Add this code to your theme functions.php file or a custom plugin
add_filter( 'woocommerce_shipstation_export_custom_field_2', 'shipstation_custom_field_2' );
function shipstation_custom_field_2() {
return '_meta_key'; // Replace this with the key of your custom field
// This is for custom field 3
add_filter( 'woocommerce_shipstation_export_custom_field_3', 'shipstation_custom_field_3' );
mrkdevelopment / style.css
Created Jun 7, 2017
Divi WooCommerce Button Fix
View style.css
body .et_pb_button:hover, .woocommerce a.button.alt:hover, .woocommerce-page a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce-page button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce-page input.button.alt:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce-page #respond input#submit.alt:hover, .woocommerce #content input.button.alt:hover, .woocommerce-page #content input.button.alt:hover, .woocommerce a.button:hover, .woocommerce-page a.button:hover, .woocommerce button.button:hover, .woocommerce-page button.button:hover, .woocommerce input.button:hover, .woocommerce-page input.button:hover, .woocommerce #respond input#submit:hover, .woocommerce-page #respond input#submit:hover, .woocommerce #content input.button:hover, .woocommerce-page #content input.button:hover {
color: #fff;
.woocommerce a.button.alt, .woocommerce-page a.button.alt, .woocommerce button.button.alt, .woocommerce-page button.button.alt, .woocommerce input.button.alt, .woocommerc
anonymous /
Created Jun 5, 2017
Sensor for USPS packages.
For more details about this platform, please refer to the documentation at
from collections import defaultdict
import logging
from datetime import timedelta
adnan360 /
Last active Oct 7, 2020
Use HTTPS on Localhost (XAMPP, Windows)

Sometimes some websites require https to work. This can be useful in those cases.

This has been tested with XAMPP (PHP 7.0.8) on Windows 7. Please see the Reference links at the end if in confusion about some step.

STEP 1: Editing Configs


ziadoz /
Last active Nov 29, 2020
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# Versions
franticpsyx / composites_sale_status_tweak.php
Last active Feb 29, 2020
Use this snippet to prevent composites with component discounts from appearing as on-sale.
View composites_sale_status_tweak.php
* Plugin Name: WooCommerce Composite Products - Sale Status Tweak
* Plugin URI:
* Description: Prevents Composite Products with component discounts from appearing as on-sale.
* Version: 1.0
* Author: SomewhereWarm
* Author URI:
* Developer: Manos Psychogyiopoulos
agusmu / functions.php
Created Oct 10, 2016 — forked from fervous/functions.php
Show shipping by vendor next to item in cart
View functions.php
add_filter( 'woocommerce_cart_item_name', 'wcv_shipping_cart_item', 1, 3 );
function wcv_shipping_cart_item( $title = null, $cart_item = null, $cart_item_key = null ) {
$settings = get_option( 'woocommerce_wcv_pro_vendor_shipping_settings' );
$customer_address = array( 'country' => WC()->customer->get_shipping_country(), 'state' => WC()->customer->get_shipping_state() );
$package = array( 'destination' => $customer_address );
$shipping_rate = WCVendors_Pro_Shipping_Method::get_shipping_rate( $cart_item[ 'product_id' ], $cart_item['data']->post->post_author, $package, $settings );
if( $cart_item_key && is_cart() ) {
echo $title. '<br /><span class=""><br>Shipping : ' . get_woocommerce_currency_symbol(). $shipping_rate->fee . '</span>';
brianjking / Procfile
Created Aug 16, 2016 — forked from mabroor/Procfile
Hosting Private password protected Sphinx Docs
View Procfile
web: gunicorn -w4 -b0.0.0.0:$PORT app:app
You can’t perform that action at this time.