Skip to content

Instantly share code, notes, and snippets.

View CodeBrotha's full-sized avatar

Tineyi CodeBrotha

  • United States
View GitHub Profile
@CodeBrotha
CodeBrotha / Create Stacks & Bundles on Shopify using Collection
Created September 20, 2020 01:44 — forked from minionmade/Create Stacks & Bundles on Shopify using Collection
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 / WSL-Ubuntu-oh-my-zsh-setup.md
Last active December 1, 2023 04:28
WSL Ubuntu: oh-my-zsh Setup:

WSL Ubuntu: oh-my-zsh Setup:

Installing Zsh:

sudo apt install zsh

After installing it, type zsh

zsh will ask you to choose some configuration.

@CodeBrotha
CodeBrotha / checkout.liquid
Last active November 19, 2020 19:06
Hide Specific Shipping Rates From Shopify Checkout (Shopify Plus Stores Only)
{% comment %} Hide Secret Shipping Rates From Checkout {% endcomment %}
<script type="text/javascript">
if (Shopify.Checkout.step == 'shipping_method') {
$(window).load(function () {
$(".radio__label__primary").each(function () {
var shipMeth = $(this).data("shipping-method-label-title");
if (shipMeth) {
if (shipMeth.includes("Name Of Secret Shipping Rate Here") || shipMeth.includes("Another Secret Ship Option Rate Here")) {
$(this).closest(".content-box__row").remove();
$(".section__content").each(function () {
@CodeBrotha
CodeBrotha / .hyper.js (MacOS)
Last active September 17, 2020 18:54
Hyper Config MacOS
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@CodeBrotha
CodeBrotha / .hyper.js (Windows)
Last active September 1, 2020 16:23
Hyper Config (Windows)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@CodeBrotha
CodeBrotha / Add Color Swatches using hex values.md
Created August 28, 2018 01:43 — forked from carolineschnapp/Add Color Swatches using hex values.md
Add Color swatches to #Brooklyn theme. Use hexadecimal values or images.

What we want

We want to go from this:

Alt text

... to that:

Alt text

@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
@CodeBrotha
CodeBrotha / buy-X-get-1-free-template.rb
Last active August 18, 2017 05:35
Shopify Plus - Shopify Script - Buy X products of the same vendor, get 1 free.
# Buy X products of the same vendor, get 1 free.
class VendorSelector
def initialize(vendor, tag)
@vendor = vendor
@tag = tag
end
# Returns whether a or not a line item matches the selector.
@CodeBrotha
CodeBrotha / ssl_puma.sh
Created June 26, 2017 15:10 — forked from nathancolgate/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key
$ cd ~/.ssh
$ openssl genrsa -des3 -passout pass:x -out lvh.me.pass.key 2048
# 2) Generate RSA key
$ openssl rsa -passin pass:x -in lvh.me.pass.key -out lvh.me.key
# 3) Get rid of private key
$ rm lvh.me.pass.key
@CodeBrotha
CodeBrotha / bootstrap_glyphs_in_rails.md
Created June 23, 2017 16:10 — forked from iamatypeofwalrus/bootstrap_glyphs_in_rails.md
Get Glyphicons up and running in Rails 3.2 without using a gem

Getting Glyphicons from Bootstrap 3.0 in Rails: the easy way

What

Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely

How

  1. Download the bootstrap-glyphicons.css from here. Save that file to RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css
  2. Save all the font files in /dist/fonts from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fonts
  3. Add this folder to the asset pipeline by appending config.assets.paths << Rails.root.join("vendor","assets", "fonts") to application.rb after the line that has class Application < Rails::Application.
  4. In bootstrap-glyphicons.css modify the the `url