Skip to content

Instantly share code, notes, and snippets.

View gil--'s full-sized avatar
💚
Building @ Shopify

Gil Greenberg gil--

💚
Building @ Shopify
View GitHub Profile
@edlaver
edlaver / helpPage.jsx
Created September 13, 2023 10:00
Example service to fetch a Notion record map from a cf-notion-cache worker, and render it in a Polaris container
import React from "react";
import {
Layout,
LegacyCard,
Page,
SkeletonBodyText,
SkeletonDisplayText,
TextContainer,
} from "@shopify/polaris";
@jg-rp
jg-rp / assignment_expression.bnf
Last active September 9, 2023 21:34
Liquid template expression syntax
expression : ID "=" filtered
filtered : left { "|" filter }
left : literal
| path
| range
literal : FLOAT
| INTEGER
@shashankkr9
shashankkr9 / shopify_plans.txt
Created January 8, 2021 16:53
Shopify Plans
basic
frozen
cancelled
professional
affiliate
trial
dormant
shopify_plus
unlimited
paused
@ShopifyEng
ShopifyEng / Confetti.tsx
Created April 6, 2020 17:11
Building Arrive's Confetti in React Native with Reanimated - Confetti Final
import React, {useMemo} from 'react'
import Animated from 'react-native-reanimated'
import {View, Dimensions, StyleSheet} from 'react-native'
import FastImage from 'react-native-fast-image'
import ConfettiImage from 'assets/images/confetti.png'
const NUM_CONFETTI = 100
const COLORS = ['#00e4b2', '#09aec5', '#107ed5']
const CONFETTI_SIZE = 16
@straker
straker / README.md
Last active November 7, 2024 10:35
Basic Pong HTML and JavaScript Game

Basic Pong HTML and JavaScript Game

This is a basic implementation of the Atari Pong game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a ball goes past a paddle, the other player should score a point. Use context.fillText() to display the score to the screen
@kellyvaughn
kellyvaughn / graphql-using-vanilla-js.js
Last active January 11, 2022 23:12
Shopify GraphQL Storefront API using Vanilla JavaScript
// This example was used to pull in variant titles and IDs dynamically
// on a custom build of the ReCharge customer portal.
//
// Feel free to send me an email if you have any questions.
//
// Kelly Vaughn -- The Taproom Agency
// [email protected]
// 1. Retrieve product ID in any format
const productId = <pathToProductId>;
@gil--
gil-- / shopify_delete_orders.js
Created December 18, 2018 21:58 — forked from xmcp123/shopify_delete_orders.js
Delete all orders from a shopify store admin panel.
//Run this from /admin/orders/. Paste it into the javascript console and press enter.
function delete_all()
{
l = $("[name*=order_ids_]");
console.log("Found "+l.length+" checkboxes");
for(i=0; i<l.length; i++)
{
name = $(l[i]).attr("name");
if(name.indexOf("order_ids_") > -1)
{
@peterjaap
peterjaap / gatsby-node.js
Last active November 21, 2018 10:03
Magento 2.3 GraphQL all products query for Gatsby
const _ = require('lodash')
const { GraphQLClient } = require('graphql-request')
const path = require('path')
const crypto = require('crypto')
const baseUrl = 'https://www.yourmagento2shop.com/'
const { createRemoteFileNode } = require(`gatsby-source-filesystem`)
// Query Magento 2.3
@xmcp123
xmcp123 / shopify_delete_orders.js
Created March 1, 2018 01:35
Delete all orders from a shopify store admin panel.
//Run this from /admin/orders/. Paste it into the javascript console and press enter.
function delete_all()
{
l = $("[name*=order_ids_]");
console.log("Found "+l.length+" checkboxes");
for(i=0; i<l.length; i++)
{
name = $(l[i]).attr("name");
if(name.indexOf("order_ids_") > -1)
{