Skip to content

Instantly share code, notes, and snippets.

View JoeyBurzynski's full-sized avatar
💭
Hacking away on @EdgeSEO tools.

Joey Burzynski JoeyBurzynski

💭
Hacking away on @EdgeSEO tools.
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / how-to-resolve-cloudflare-trailing-slash-308-redirect.md
Created March 19, 2024 17:05
How to Resolve Cloudflare Trailing Slash Redirect (308)

Fix Cloudflare 308 Trailing Slash Redirect Issue

Reference URLs:

Command

# Reference: https://explainshell.com/explain?cmd=find+.%2Fdist+-name+%27index.html%27+-mindepth+2+-type+f+%5C+++++-exec+sh+%5C+++++-c+%27parent%3D%22%24%28dirname+%22%241%22%29%22%3B+mv+%22%241%22+%22%24parent%2F..%2F%24%28basename+%22%24parent%22%29.html%22%3B%27+%5C+++++find-sh+%7B%7D+%5C%3B
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active November 4, 2024 07:33
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@JoeyBurzynski
JoeyBurzynski / Homebrew_How-to-Backup-and-Restore-Homebrew-Packages-2022.md
Last active October 14, 2024 07:08
Homebrew: How to Backup & Restore Homebrew Packages [2022, MacOS]

Homebrew: How to Backup & Restore Homebrew Packages

Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.

If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.

Brewfiles

Brewfiles are files generated with definitions that Homebrew reads and processes, a generated

@JoeyBurzynski
JoeyBurzynski / getStatusCode.gs
Last active September 11, 2024 18:13
Google Sheets Function (SEO, How to Fetch HTTP Status Code for URL in Google Sheets)
/**
Google Sheets Function (Fetch HTTP Status Code for URL)
How to Fetch HTTP Status Code for URL in Google Sheets
Reference URL: https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
**/
function getStatusCode(url){
var options = {
'muteHttpExceptions': true,
'followRedirects': false
@JoeyBurzynski
JoeyBurzynski / cloudflare-dynamic-redirect-rule-dynamically-match-and-replace-url-path-segments-via-regexp-301.md
Created March 19, 2024 18:06
Cloudflare Dynamic Redirect Rule: Dynamically Match and Replace URL Path Segments via RegExp [301]

Dynamically Match and Replace URL Path Segments via RegExp [301]

  • Rule Name: Dynamic Redirect of Brand Locations [301]

Expression

(http.request.uri.path matches "^/locations/.*-tires-.*.asp$")
@JoeyBurzynski
JoeyBurzynski / active_os.sh
Last active August 8, 2024 20:17
Determine Active Operating System in Bash Script
#!/usr/bin/env bash
# * Determine operating system via $OSTYPE
function active_operating_system_ostype() {
echo
echo "Determining active operating system via \$OSTYPE"
echo " » \$OSTYPE output: $OSTYPE"
local active_os
@JoeyBurzynski
JoeyBurzynski / README_MINIMAL_PROMPT_CHAINABLE.md
Created July 27, 2024 14:37 — forked from disler/README_MINIMAL_PROMPT_CHAINABLE.md
Minimal Prompt Chainables - Zero LLM Library Sequential Prompt Chaining & Prompt Fusion

Minimal Prompt Chainables

Sequential prompt chaining in one method with context and output back-referencing.

Files

  • main.py - start here - full example using MinimalChainable from chain.py to build a sequential prompt chain
  • chain.py - contains zero library minimal prompt chain class
  • chain_test.py - tests for chain.py, you can ignore this
  • requirements.py - python requirements

Setup

@JoeyBurzynski
JoeyBurzynski / web-design-inspiration-and-best-front-end-development-tools.md
Last active July 17, 2024 14:36
Web Design Inspiration: Best Practice, Blogs, Guides, Lists, Web Design Inspiration & Front-end Development Tools
@JoeyBurzynski
JoeyBurzynski / sample-in-stock-product.jsonld
Last active June 27, 2024 14:20
Sample Product JSON-LD (In Stock)
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"reviewCount": "11"
},
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
"name": "Kenmore White 17\" Microwave",
@JoeyBurzynski
JoeyBurzynski / product-jsonld-example.jsonld
Created June 27, 2017 13:35
Product JSON-LD Example
{
"@context": "http://schema.org",
"@type": "Product",
"description": "Ultralight and packable, this down jacket is a consummate traveler, whether your destination is cross town or far off the beaten path. Nylon shell with 650 fill Premium Down insulation for superior warmth that easily compresses into the included pouch for storage.",
"image": "http://eddiebauer.scene7.com/is/image/EddieBauer/D0060103_409C1?$mainimageV2$",
"mainEntityOfPage": "http://www.eddiebauer.com/product/women-39-s-cirruslite-down-jacket/20612407",
"name": "Women's CirrusLite Down Jacket",
"sku": "123456789",
"gtin14": "12345678901234",
"mpn": "925873",