Skip to content

Instantly share code, notes, and snippets.

@statickidz
statickidz / functions.php
Last active February 24, 2024 04:35
Woocommerce - Show Custom Filter and Admin Column for Catalog Visibility
<?php
/**
* @snippet Show Custom Filter and Admin Column for Catalog Visibility @ WooCommerce Products Admin
* @sourcecode https://gist.github.com/statickidz/6a539550d8e0d13d2c3d12318672e816
* @author Adrián Barrio Andrés (statickidz.com)
*/
add_filter('woocommerce_product_filters', 'skidz_filter_by_catalog_visibility_dashboard_products');
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@nickdavis
nickdavis / template-iframe.php
Created October 21, 2014 19:28
Add a 'full width' iFrame (WordPress) page template using a custom field for the iFrame URL and including Genesis scripts (if set) in the header
<?php
// Template Name: iFrame
/**
* Get the URL for the iFrame from a custom field
*
* @link http://www.billerickson.net/advanced-custom-fields-frontend-dependency/
*/
$url = esc_url( get_post_meta( get_the_ID(), 'iframe', true ) );