Skip to content

Instantly share code, notes, and snippets.

View db-pj's full-sized avatar

PJ Fancher db-pj

View GitHub Profile
@db-pj
db-pj / gist:235947b0d98a042248b57639c956842d
Last active October 6, 2021 18:01
Screaming Frog Command Line
screamingfrogseospider \
--crawl https://www.digitalbrands.com \
--headless \
--config ~/sf.seospiderconfig \
--task-name 'DigitalBrands.com Crawl Report' \
--project-name 'DigitalBrands.com' \
--export-format 'gsheet' \
--google-drive-account 'pj@digitalbrands.com' \
--export-custom-summary "Site Crawled,Date,Time,Total URLs Encountered,Total URLs Crawled,Total Internal blocked by robots.txt,Total External blocked by robots.txt,URLs Displayed,Total Internal URLs,Total External URLs,Total Internal Indexable URLs,Total Internal Non-Indexable URLs,JavaScript:All,JavaScript:Uses Old AJAX Crawling Scheme URLs,JavaScript:Uses Old AJAX Crawling Scheme Meta Fragment Tag,JavaScript:Page Title Only in Rendered HTML,JavaScript:Page Title Updated by JavaScript,JavaScript:H1 Only in Rendered HTML,JavaScript:H1 Updated by JavaScript,JavaScript:Meta Description Only in Rendered HTML,JavaScript:Meta Description Updated by JavaScript,JavaScript:Canonical Only in Rendered HTML,JavaScript:Canonical Mismatch,JavaScript:Noindex
  • Kick everyone off current Site
  • Push repo and dump db
  • Switch monsoon.cfg URL
  • Pull repo and import db to new site
  • Switch DOMAIN_PRODUCTION env var on new site
  • Switch IS_PRODUCTION env var on new site
  • logout/login
  • Bring Site Down
  • Switch DNS
  • Unproxy site on Cloudflare
//a[@href='https://pj.passprotect.me/news/']
//a[contains(@href,'how-to/nodejs__dirname/')]
.icon-page {background-image: url('/wp-content/themes/mt-desktop/public/images/_sprites/_credit-cards/sprite.@2x.png');background-size: 350px 288px;display: inline-block;}
.s-icon-0-apr:hover, .icon-hover:hover .s-icon-0-apr {width: 70px;height:72px;background-position: -0px -0px;}
.s-icon-0-apr {width: 70px;height:72px;background-position: -70px -0px;}
.s-icon-balance-transfer:hover, .icon-hover:hover .s-icon-balance-transfer {width: 70px;height:72px;background-position: -140px -0px;}
.s-icon-balance-transfer {width: 70px;height:72px;background-position: -0px -72px;}
.s-icon-best-overall:hover, .icon-hover:hover .s-icon-best-overall {width: 70px;height:72px;background-position: -70px -72px;}
.s-icon-best-overall {width: 70px;height:72px;background-position: -140px -72px;}
.s-icon-business:hover, .icon-hover:hover .s-icon-business {width: 70px;height:72px;background-position: -210px -0px;}
.s-icon-business {width: 70px;height:72px;background-position: -210px -72px;}
.s-icon-cash-back:hover, .icon-hover:hover
@db-pj
db-pj / Delete WP generated images.txt
Last active March 1, 2021 23:47
Delete WP generated images
find -type f -regex '.*\-[0-9]+x[0-9]+.\(jpg\|png\|jpeg\|gif\)$' >> images-to-delete.txt
find -type f -regex '.*\-[0-9]+x[0-9]+.\(jpg\|png\|jpeg\|gif\)$' -exec rm -rfv {} \;
Disable Simple Image Sizes
Zero out media image sizes
Add = Create a capability e.g. feature, test, dependency.
Cut = Remove a capability e.g. feature, test, dependency.
Fix = Fix an issue e.g. bug, typo, accident, misstatement.
Bump = Increase the version of something e.g. dependency.
Make = Change the build process, or tooling, or infra.
@db-pj
db-pj / gist:764b761142ac2480876f546d1c9ad2ba
Last active September 13, 2019 15:15
Screaming Frog noreferrer noopener Extractor
//a[@target='_blank' and not(contains(@rel, 'noreferrer noopener'))and not(contains(@class, 'jump')) and not(contains(@href, '/external/'))]/@href
@db-pj
db-pj / Screaming Frog XPath Extract relative URLs.txt
Last active March 1, 2019 19:43
Screaming Frog XPath Extract relative URLs
//a[contains(@href, 'mbl/visit?site=') and not(contains(@href, 'https://www.datingadvice.com'))]/@href
//a[contains(@href, 'official-site/?offer=') and not(contains(@href, 'https://www.cardrates.com'))]/@href
//a[contains(@href, 'mbl/go/?offer=') and not(contains(@href, 'https://www.badcredit.org'))]/@href
//a[contains(@href, 'visit/?offer=') and not(contains(@href, 'https://www.hostingadvice.com'))]/@href
@db-pj
db-pj / da-host-switch-checklist.md
Last active February 9, 2021 16:49
DA Host Switch Checklist

DA Host Switch Checklist

Pre-DNS

Rackspace Server

  • Alert VM & Editors
  • Push Master
  • Backup Database

DatingAdviceMbl-2017-12-15--15-48-56.sql.gz

@db-pj
db-pj / gist:7a57037472339dd68c7f7af6aa4bec9b
Created July 25, 2017 20:03
XPath to extract links with jump class and no target=_blank
//a[@class='jump' and not(@target='_blank')]/@href