Skip to content

Instantly share code, notes, and snippets.

@anvychow
anvychow / script.rb
Created April 15, 2020 19:06 — forked from maxkostinevich/script.rb
Shopify Script #5 - Buy anything from collection A and get anything from collection B with X% discount
# Buy anything from collection A and get anything from collection B with X% discount,
# if discount code XYZ is applied
# Custom Message
CHECKOUT_MESSAGE = "Get a 50% off"
# Discount code which should me appled
DISCOUNT_CODE = "GET50OFF"
COLLECTION_A = ["BACKPACKS"]
@anvychow
anvychow / dev.yml
Created April 15, 2020 19:06 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@anvychow
anvychow / main.yml
Created April 15, 2020 19:05 — forked from maxkostinevich/main.yml
Github Actions - Deploy Jigsaw to Github Pages
# Learn more at https://maxkostinevich.com/blog/deploy-jigsaw-using-github-actions
name: Deploy
on:
push:
branches:
- master
jobs:
@anvychow
anvychow / index.html
Created April 15, 2020 19:04 — forked from maxkostinevich/index.html
Serverless Social Proof widget for Shopify
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Static Template</title>
</head>
<body>
<h1>
@anvychow
anvychow / index.html
Created April 15, 2020 19:03 — forked from maxkostinevich/index.html
Serverless contact form - Cloudflare Worker - Handle Contact Form
<!--
/*
* Serverless contact form handler for Cloudflare Workers.
* Emails are sent via Mailgun.
*
* Learn more at https://maxkostinevich.com/blog/serverless-contact-form
* Live demo: https://codesandbox.io/s/serverless-contact-form-example-x0neb
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
@anvychow
anvychow / README.md
Created March 9, 2020 04:22 — forked from roachhd/README.md
Ode To Dan : Quick switch Themes with javascript

A simple clone of Dan Edens' blog with the day/night persistent toggle ❤️

<script>
// Toggle night theme
var d = document.documentElement,
    t = document.querySelectorAll(".js--toggle-lights")[0],
    m = localStorage.getItem("nightmode");

if(m == "true") {
@anvychow
anvychow / wp-query-ref.php
Created December 6, 2019 02:40 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/