Skip to content

Instantly share code, notes, and snippets.

View CodeBrotha's full-sized avatar

Tineyi CodeBrotha

  • United States
View GitHub Profile
@josemarimanio
josemarimanio / install_pyenv_mac_zsh.rst
Created May 13, 2020 12:13
Installing pyenv on macOS for Zsh using Homebrew
@klevu
klevu / query-1
Last active February 12, 2024 12:00
Shopify Metafields with GraphQL
{
product(first: 50) {
edges {
node {
name
description
}
}
}
}
@tringn
tringn / README.md
Last active May 31, 2024 15:40
Install OhMyZsh with agnoster theme in MacOS Catalina Terminal

Step 1: Install Zsh (this may not be necessary because Zsh has been installed in MacOs Catalina)

brew install zsh

Step 2: Install OhMyZsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Step 3: Change shell in Mac Terminal from Bash to Zsh

chsh -s /bin/zsh

Step 4: Open ~/.zshrc, change ZSH_THEME from "robbyrussell" to "agnoster"

@ChristophShyper
ChristophShyper / wsl2-docker.md
Last active January 10, 2023 20:36
Instruction how to set up WSL2 to work with Docker in Windows 10

On Windows 10 build 18917 or higher

Win / Enable WSL and VMP

PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Win / Set WSL 2 as default

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active June 6, 2024 14:37
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@leodutra
leodutra / -setup-windows-wsl-devenv.md
Last active June 10, 2024 03:25
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

products = ShopifyAPI::Product.find(:all, params: { order: 'inventory_total desc', limit: 250 })
process_products(products)
3.times do
break unless products.next_page?
products = products.fetch_next_page
process_products(products)
end
@dlerm
dlerm / dev-box.sh
Last active October 18, 2023 16:12
Dev tools install script
#!/usr/bin/env bash
# Install Xcode
# Install Homebrew
# Install Node
# Install Yarn
# Install Gulp
# Install Bower
# Install Linters
# Set OS defaults
@Lysindr
Lysindr / collection.liquid
Last active September 29, 2023 14:59
Shopify AJAX filter collection page with TAGS
<div class="collection__main">
<!-- COLLECTION SIDEBAR -->
{%- capture categories -%}
{%- for tag in collections[collection.handle].tags -%}
{%- if tag contains 'categories' -%}
{%- assign tag_patterns = tag | split: '_' -%}
<li class="collection-sidebar__filter-item main-filter" data-tag="{{ tag | handle }}">{{ tag_patterns[1] }}</li>
{%- endif -%}
{%- endfor -%}
@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active May 31, 2024 13:30
Docker Compose Cheatsheet