Skip to content

Instantly share code, notes, and snippets.

View bryanleetc's full-sized avatar

Bryan Lee bryanleetc

View GitHub Profile
@bryanleetc
bryanleetc / 2nd version to grab product details (bryan)
Last active January 25, 2019 10:11 — forked from axflo/product_details_for_widget
Snippet to be pasted in console in product details page to get data for the product widget
// Bryan's version
let product = window.App.payload.product || {};
function getDetails() {
const transformedPrice = product.price_range.max === product.price_range.min ? `$${product.price_range.min}` : `$${product.price_range.min} - $${product.price_range.max}`;
return {
title: product.title,
supply_id: product.id,
@bryanleetc
bryanleetc / nginx.conf
Last active August 29, 2015 14:16 — forked from Stanback/nginx.conf
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers