This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SHIPPING IN CART | |
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>'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: gunicorn -w4 -b0.0.0.0:$PORT app:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Add this code if you would like accordions on your Category Page --> | |
<div class="container-divider"></div> | |
<div class="container"> | |
<nav class="sub-nav"> | |
{{breadcrumbs}} | |
{{search submit=false}} | |
</nav> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// content.php | |
$config = array( | |
'title' => __('General Options', 'theme_admin'), | |
'group_id' => 'general', | |
'context' => 'normal', | |
'priority' => 'low', | |
'types' => array( 'page' ) | |
); | |
$options = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// This would go in $sublime_dir/Packages/User/GitGutter.sublime-settings | |
{ | |
"live_mode": false, | |
"focus_change_mode": false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MC_API_KEY="apikey:YOUR_KEY" | |
MC_LIST_ID="YOUR LIST ID" | |
# don't forget to update usN to your own MailChimp data center ID | |
TOTAL_ITEMS=`curl --silent --request GET --url "https://usN.api.mailchimp.com/3.0/lists/$MC_LIST_ID/members?fields=total_items" --user $MC_API_KEY | jq -r ".total_items"` | |
CHUNK_SIZE=1000 | |
echo "id,email_address,status,avg_open_rate,avg_click_rate,timestamp_signup,last_changed,member_rating" > mailchimp_list.csv | |
echo "action,timestamp,url,type,campaign_id,title,parent_campaign,subscriber_id" > mailchimp_list_activity.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
########################################################################### | |
# Originally written by: Henrik Bengtsson, 2014 | |
# https://github.com/HenrikBengtsson/speedtest-cli-extras | |
# Modified to use IFTTT by: Alasdair Allan, 2015 | |
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html] | |
########################################################################### | |
# Character for separating values | |
# (commas are not safe, because some servers return speeds with commas) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set itermRunning to (application "iTerm" is running) | |
set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh") | |
set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'" | |
tell application "iTerm" | |
activate | |
if not (exists window 1) or (itermRunning = false) then | |
reopen | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |