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 / 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 / cloudflare-dynamic-redirect-rule-enforce-trailing-slash-in-url-paths-via-301-redirect.md
Created March 19, 2024 17:53
Cloudflare Dynamic Redirect Rule: Enforce Trailing Slash in URL Paths via 301 Redirect
@JoeyBurzynski
JoeyBurzynski / cloudflare-dynamic-redirect-rule-enforce-lowercase-url-paths.md
Created March 19, 2024 17:39
Cloudflare Dynamic Redirect Rule: Enforce Lowercase URL Paths via 301 Redirect
@JoeyBurzynski
JoeyBurzynski / chatgpt-code-review-prompt.js
Last active February 13, 2024 06:48
ChatGPT Code Review Prompt: 10X Software Developer [Review, Improve and Optimize]
/**
================[ Step 1: Code Review ]================
Act as a 10X software developer.
Personal Characteristics:
You, as a 10X developer, exemplify what it means to be a true leader and innovator in the tech industry.
You're fluent in all modern stacks and are regarded as an expert in all modern programming languages, frameworks, and software engineering paradigms.
You seamlessly navigate between front-end and back-end technologies, handle databases, deployments, and even confidently manage networking and security elements.
@JoeyBurzynski
JoeyBurzynski / screaming-frog-exclusions.md
Created September 21, 2023 09:43
Screaming Frog: Ad Pixels & Tracker Exclusion List

Screaming Frog Exclusion List: Ad Pixels & Trackers

Last Update: 2023.09.21

https://aa.agkn.com/adscores/g.pixel\?sid=\d+&sifi_uid=
https://ads.stickyadstv.com/user-registering\?dataProviderId=\d+&userId=
https://app.signpanda.me/scripttag/product\?shop=[\w.]+&product_uuid=\d+&force_check=true
https://bat.bing.com/action/0\?ti=\d+
https://bcp.crwdcntrl.net/map/c=\d+/tp=SIMP/tpid=
@JoeyBurzynski
JoeyBurzynski / cloudflare-worker-ip-to-real-client-ip-address.js
Last active February 15, 2024 10:39
Resolving Cloudflare Worker IP Issues [Replace Cloudflare Worker IP with Real Client IP in X-Forwarded-For HTTP Header]
// Cloudflare Worker Sandbox Examples
// Learning here, not intended for production use.
// https://cloudflareworkers.com/#6bc84bcddcf251074b41adba568a9284:https://tutorial.cloudflareworkers.com
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
})
/**
@JoeyBurzynski
JoeyBurzynski / sample-hreflang-annotations-in-html-markup.html
Created February 6, 2023 08:07
Sample Hreflang Annotations via HTML Markup
<!-- x-default: default when no language matches -->
<link rel="alternate" hreflang="x-default" href="https://www.mordorintelligence.com"/>
<!-- English (en) -->
<link rel="alternate" hreflang="en" href="https://www.mordorintelligence.com"/>
<!-- Arabic: macrolanguage (ar) -->
<link rel="alternate" hreflang="ar" href="https://www.mordorintelligence.sa"/>
<!-- Chinese (zh) -->
@JoeyBurzynski
JoeyBurzynski / sample-hreflang-annotations-in-xml-sitemap.xml
Last active February 6, 2023 07:59
Sample hreflang annotations via XML sitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.mordorintelligence.sa</loc>
<!-- Arabic: macrolanguage (ar) -->
<xhtml:link
rel="alternate"
hreflang="ar"
href="https://www.mordorintelligence.sa"/>
@JoeyBurzynski
JoeyBurzynski / globalErrorHandler.js
Created February 1, 2023 20:38
JavaScript: Global onerror handler
window.addEventListener('error', function(e) {
var errorText = [
e.message,
'URL: ' + e.filename,
'Line: ' + e.lineno + ', Column: ' + e.colno,
'Stack: ' + (e.error && e.error.stack || '(no stack trace)')
].join('\n');
// Example: log errors as visual output into the host page.
// Note: you probably don't want to show such errors to users, or
@JoeyBurzynski
JoeyBurzynski / how-to-deal-with-unhandled-exceptions-and-unhandled-promise-rejections-in-javascript.md
Last active October 7, 2022 07:54
JavaScript: How to Deal with Unhandled Exceptions & Unhandled Promise Rejections in JavaScript