Skip to content

Instantly share code, notes, and snippets.

@jklue
jklue / 2-step form with authentication.markdown
Last active June 21, 2016 15:59
2-step form with authentication
<style>
@import url('https://fonts.googleapis.com/css?family=Pacifico');
@font-face {
font-family:'KGSkinnyLatte';
src: url(//cdn.shopify.com/s/files/1/0440/7457/t/4/assets/2B06BA_0_0.eot?13339726179268781510);
src: url(//cdn.shopify.com/s/files/1/0440/7457/t/4/assets/2B06BA_0_0.eot?%23iefix&13339726179268781510) format('embedded-opentype'),
url(//cdn.shopify.com/s/files/1/0440/7457/t/4/assets/2B06BA_0_0.woff?13339726179268781510) format('woff'),
url(//cdn.shopify.com/s/files/1/0440/7457/t/4/assets/2B06BA_0_0.ttf?13339726179268781510) format('truetype');
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main;
# prompt
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\033[0;32m"
NO_COLOR="\[\033[0m\]"
NC="\033[0m"
@jklue
jklue / build-in-cart-bundle.rb
Last active August 10, 2018 12:10 — forked from shopifypartners/shopify-scripts-buy-set-get-x-off-script.rb
Bundle items in the cart for a discount according to set product types
################################################################################
# Get discount off planner if bundle items also in cart.
#
# This script applies a discount to the planner item if a certain number of other
# bundled products are in the cart.
#
################################################################################
################################################################################
{
"product": {
"title": "Ready Roll - Camo",
"body_html": "Carry your tools in your jersey pockets for quicker and easier access to your gear. Each tool roll is 9&quot; wide and 6&quot; deep and has three pockets.<br><br>There are two styles. The first has two outside pleated pockets and one flat pocket in the middle. The second roll has one extra deep pleated pocket in the center (to accommodate a spare tube). The tool rolls are made of rip-stop nylon fabric, so they&#39;re lightweight, durable, and machine washable.<br><br>Should you need your tools during a ride, everything in your tool roll is far more accessible than from a saddle bag. Once you have your tools out, the tool role also functions as a working surface where you can set your tools and parts while you&#39;re performing maintenance. That way you won&#39;t lose anything in the grass or roadside debris. And once you&#39;re done, it&#39",
"vendor": "rolluprollout",
"product_type": "Bags and Purses",
"images": [
{