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
TAG = "vip" #customer tag | |
MESSAGE = "VIP Customer Reward" #additional message | |
customer = Input.cart.customer | |
if customer | |
if customer.tags.include?(TAG) | |
Input.shipping_rates.each do |shipping_rate| | |
if shipping_rate.name.include?("Insured Shipping and Handling (USPS Priority Express)") | |
shipping_rate.change_name("FREE VIP GROUND SHIPPING (USPS Priority Express)", { message: "" }) | |
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE) |
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
/* Sample JavaScript file added with ScriptTag resource. | |
This sample file is meant to teach best practices. | |
Your app will load jQuery if it's not defined. | |
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7. | |
Your app does not change the definition of $ or jQuery outside the app. | |
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2' | |
once the app is installed, even if the app uses jQuery 1.9.1: | |
jQuery.fn.jquery => "1.4.2" | |
$.fn.jquery -> "1.4.2" | |
*/ |
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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
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
from collections import deque | |
from math import sin, cos, pi, atan2, hypot | |
import random | |
import time | |
import wx | |
SIZE = 600 | |
COUNT = 64 | |
SPEED = 100 | |
FOLLOWERS = 4 |
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
import ddf.minim.analysis.*; | |
import ddf.minim.*; | |
Minim minim; | |
AudioPlayer jingle; | |
FFT fft; | |
AudioInput in; | |
float[] angle; | |
float[] y, x; | |
void setup() |
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
/* | |
* Project: Shopify AJAX Cart Plugin | |
* Description: Provides AJAX cart functionality for interacting with the Shopify AJAX API so you don't need an "Update Cart" button | |
* Dependency: jQuery 1.6+ | |
* Author: Ryan Marshall (ryan@schmoove.co.nz) | |
* License: Free | |
* Usage: | |
* | |
* $('#cart-form').shopifyAJAXCart({ | |
* item: '.line-item-container', |
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
/* Sample JavaScript file added with ScriptTag resource. | |
This sample file is meant to teach best practices. | |
Your app will load jQuery if it's not defined. | |
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7. | |
Your app does not change the definition of $ or jQuery outside the app. | |
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2' | |
once the app is installed, even if the app uses jQuery 1.9.1: | |
jQuery.fn.jquery => "1.4.2" | |
$.fn.jquery -> "1.4.2" | |
*/ |