Skip to content

Instantly share code, notes, and snippets.

View CodeBrotha's full-sized avatar

Tineyi CodeBrotha

  • United States
View GitHub Profile
@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active March 27, 2026 06:39
Docker Compose Cheatsheet
@tomsihap
tomsihap / gist:e703b9b063ecc101f5a4fc0b01a514c9
Created December 23, 2018 14:46
Install NVM in Ubuntu 18.04 with ZSH
# Find the latest version on https://github.com/creationix/nvm#install-script
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Add in your ~/.zshrc the following:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
$ source ~/.zshrc
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
@vishalarora91
vishalarora91 / Minimum order amount validation on Checkout Page - Shopify
Last active June 12, 2020 21:46
Minimum order amount validation on Checkout Page - Shopify
{% if checkout.total_price < 20000%}
<style>
.step__footer{ position: relative; padding-top: 35px; }
.step__footer:before{
content: 'Minimum orders have to be over $200.00.';
position: absolute;
top: 0;
left: 0;
font-size: 16px;
text-align: center;
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active April 3, 2026 19:02
Online Resources For Web Developers (No Downloading)
@ridem
ridem / Download-Shopify-CDN-Assets.md
Last active October 28, 2023 12:15
Download all Shopify CDN assets from a store

Instructions

  1. Go to your Shopify admin/settings/files page
  2. Open your browser Dev tools, go to the console

Then, depending on the option you choose:

Option 1 - Download all the files directly (might crash you browser)

  1. Make sure your browser is set to download files automatically and doesn't ask for the download location every time
@ridem
ridem / README.md
Last active June 27, 2022 07:37
Download a Shopify store's assets used in your theme

It's hard to migrate section themes that rely heavily on images. This bit of code helps you download all the CDN assets of your theme.

  1. Create a cdn_assets folder
  2. Create the download_assets.js file at the root of your project
  3. Edit the download_assets.js file to match the path to your settings_data.json (line 3)
  4. Edit the download_assets.js file to set the "CDN code" of your store. Each file that you upload from /admin/settings/files gets uploaded with the following format: https://cdn.shopify.com/s/files/1/YOUR_CDN_CODE/files/YOURFILE. The format of the code is /\d{4}\/\d{4}/ (four digits, a forward slash, and four digits)
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active March 27, 2026 06:36
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@minionmade
minionmade / Create Stacks & Bundles on Shopify using Collection
Last active June 1, 2021 18:25
Now you can create bundles and product stacks on Shopify using a single collection page to showcase multiple products, allowing multiple products to be added to the cart all at once! Example: https://getapi.com/collections/hustle-hard-stack#
<form action="/cart/add" method="post" enctype="multipart/form-data" id="AddToCartForm">
{% if collection.products_count > 0 %}
{% for product in collection.products %}
{% if product.available %}
<div class="row">
<div class="col-xs-12 col-sm-4">
<img src="{{ product.image | default: product.featured_image | img_url: 'large' }}" alt="{{ variant.title | escape }}" />
</div>
<div class="col-xs-12 col-sm-8" style="padding: 15% 40px 0">
<div class="col-xs-12 col-sm-12">
@CodeBrotha
CodeBrotha / config-example.yml
Last active March 18, 2021 01:00
Shopify Themekit Config Template. (config-example.yml)
## This is your TEST dev theme [in Test env]. You should make all your changes here and view on test store while working.
development:
<<: *shared
store: STORE_NAME_HERE.myshopify.com ## Test Store name.
password: ADD_PASSWORD_HERE ## Private App password from Shopify.
theme_id: 'ADD_THEME_ID_HERE' ## ID number of your Dev theme on live store.
## TEST Staging theme [in Test env]
staging-test:
<<: *shared