Skip to content

Instantly share code, notes, and snippets.

View roger-richards's full-sized avatar

Roger Richards roger-richards

View GitHub Profile
@eram
eram / outlook-unified-inbox.vba
Last active November 23, 2023 13:21
Outlook Unified Inbox Macro
' This macro creates a "unified inbox" - a search across all inboxes and sent items.
' Steps to use it:
' 1. Enable developer tab to see VBA console:
' Options > Customize Ribbon >
' Enable the selection field before “Developer” and OK.
' 2. Add macro:
' From the Developer tab open Visual Basic dialog
' Open VBA Add the Sub below to General context
' 3. Enable macros:
' Options > Trust Center > Trust Center Settings > Macro Settings
@pmkay
pmkay / top-brew-packages.txt
Last active May 4, 2024 13:12 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
@davidjgonzalez
davidjgonzalez / install.sh
Last active August 14, 2022 19:53
QNAP Homebridge Container install.sh
#!/bin/bash
# *** Copy this file to /root/.homebridge ***
# This file gets executed as root, so you can use it to
# install or update any plugin dependencies.
# See https://github.com/marcoraddatz/homebridge-docker#installsh
npm update -g n
@rynaldos-zz
rynaldos-zz / wc-hide-cats-archive-page.php
Last active March 7, 2021 00:10
[WooCommerce] Remove categories from shop and other pages
add_filter( 'get_terms', 'get_subcategory_terms', 10, 3 );
function get_subcategory_terms( $terms, $taxonomies, $args ) {
$new_terms = array();
// if a product category and on the shop page
// to hide from shop page, replace is_page('YOUR_PAGE_SLUG') with is_shop()
if ( in_array( 'product_cat', $taxonomies ) && ! is_admin() && is_page('YOUR_PAGE_SLUG') ) {
foreach ( $terms as $key => $term ) {
if ( ! in_array( $term->slug, array( 'woo' ) ) ) {
$new_terms[] = $term;
@eugenf
eugenf / woocommerce-enable-free-shipping-per-product.php
Last active June 16, 2017 19:42 — forked from BFTrick/woocommerce-enable-free-shipping-per-product.php
Enable Free Shipping on a per product basis in WooCommerce.
<?php
/**
* Plugin Name: WooCommerce Enable Free Shipping on a Per Product Basis
* Plugin URI: https://gist.github.com/BFTrick/d4a21524a8f7b25ec296
* Description: Enable free shipping for certain products
* Author: Patrick Rauland
* Author URI: http://speakinginbytes.com/
* Version: 1.0.1
*
* This program is free software: you can redistribute it and/or modify
@Pross
Pross / sendy.php
Created April 26, 2016 19:14
Add to mu-plugins folder, auto add every new user to a sendy list. Works with default WordPress and Woocommerce registrations.
<?php
add_action( 'user_register', 'add_user_to_sendy_list' );
function add_user_to_sendy_list( $user_id ) {
$list = 'SENDY_LIST_ID';
$url = 'http://SENDY_INSTALL_URL/subscribe';
$user = get_userdata( $user_id );
$email = $user->data->user_email;
$name = $user->data->user_nicename;
@bbirdme
bbirdme / woocommerce_by_tags.php
Last active March 31, 2020 08:34 — forked from corsonr/gist:5933479
List WooCommerce products by tags
<?php
/**
* Plugin Name: WooCommerce - List Products by Tags
* Plugin URI: http://www.remicorson.com/list-woocommerce-products-by-tags/
* Description: List WooCommerce products by tags using a shortcode, ex: [woo_products_by_tags tags="shoes,socks"]
* Version: 1.0
* Author: Remi Corson
* Author URI: http://remicorson.com
* Requires at least: 3.5
* Tested up to: 3.5
# =======================================
# OS X — ONE CLICK — EJECT ALL DISKS
# =======================================
# Open Script Editor on OS X
# Copy and paste this file in
# Pre-High Sierra: Save As > Application
# High Sierra: Export > File Format > Application
# Name it "Eject All Disks"
# Drag created application to Dock
# Now you can eject all external disks with one click from Dock
@fstrube
fstrube / magento-cp
Last active December 20, 2015 12:49
BETA: A shell script for copying a Magento instance on the same server. Useful for quickly spinning up a new staging environment on a shared host.
#!/bin/sh
#/ Usage: magento-cp [options] <source> <destination>
#/
#/ Options
#/ --no-anon WARNING: do not anonymize customer data
#/ --db-host=<host|socket> the new database info
#/ --db-name=<name>
#/ --db-user=<user>
#/ --db-password=<password>
#/ --exclude=<pattern> exclude specific directories during copy (can occur multiple)
@corsonr
corsonr / gist:5933479
Created July 5, 2013 10:00
List WooCommerce products by tags
<?php
/**
* Plugin Name: WooCommerce - List Products by Tags
* Plugin URI: http://www.remicorson.com/list-woocommerce-products-by-tags/
* Description: List WooCommerce products by tags using a shortcode, ex: [woo_products_by_tags tags="shoes,socks"]
* Version: 1.0
* Author: Remi Corson
* Author URI: http://remicorson.com
* Requires at least: 3.5
* Tested up to: 3.5