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 / Bookmarklet-Show-All-User-defined-Properties-on-Global-Window-Object-in-Chronological-Order.js
Created May 9, 2019 09:24
JavaScript: Show all user-defined properties on global window object.
javascript:document.body.appendChild(document.createElement('div')).innerHTML='<iframe id="temoin" style="display:none"></iframe>';Object.keys(window).filter(a=>!(a in window.frames[window.frames.length-1])).sort().forEach((a,i)=>console.log(i,a,window[a]));document.body.removeChild(document.querySelectorAll('#temoin')[0].parentNode);throw 'done';
// JS Bookmarklet: Show all user-defined properties on global window object in chronological order.
@JoeyBurzynski
JoeyBurzynski / google-link-disavow.txt
Last active April 20, 2023 03:01
Google Link Disavow / Spam Domains
@JoeyBurzynski
JoeyBurzynski / sysctl.conf
Created December 11, 2019 07:13
sysctl.conf Optimization / Ubuntu 18.04
# Kernel sysctl configuration file for Linux
#
# Version 1.14 - 2019-04-05
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
@JoeyBurzynski
JoeyBurzynski / getStatusCode.gs
Last active December 17, 2023 20:42
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
@Leszek-Sieminski
Leszek-Sieminski / gsc_download_with_R.R
Last active May 23, 2021 18:47
Downloading GSC data with R
# Description: The aim of this Gist is to show a simple way of downloading Google Search Console API data through R
# Created: 2020-04-28
# Author: Leszek Sieminski
#
# Goals:
# 1. Full - no data inconsistencies allowed
# 2. Stable - not ruining Google API limits
# 3. Functional - based on functions that encapsulate specific tasks.
#
# The idea: download all the data for every single day and loop this process for all dates in a date range
@JoeyBurzynski
JoeyBurzynski / find-duplicate-files.rb
Last active May 13, 2020 18:45
Ruby: Identify Duplicate Files in a Directory
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'pathname'
require 'digest/md5'
# * Colorize Gem (https://github.com/fazibear/colorize)
require 'colorize'
@JoeyBurzynski
JoeyBurzynski / ensure_homebrew_exists.sh
Last active May 22, 2020 08:49
Ensure Homebrew is installed and up to date.
#!/usr/bin/env bash
# * Ensure Homebrew is installed and up to date.
# ? Reference URL: https://brew.sh/
function ensure_homebrew_exists() {
echo "Ensuring Homebrew is installed and up to date."
# * $() is for command substitution, commands don't _return_ values, they _capture_ them
# ? Reference URL: https://stackoverflow.com/a/12137501/890814
@JoeyBurzynski
JoeyBurzynski / active_os.sh
Last active January 25, 2023 22:36
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 / version.check.sh
Last active September 18, 2020 10:57
Bash / Shell Script: Ensure Minimum Bash Version is Met
#!/usr/bin/env bash
# = Bash / Shell Script: Ensure Minimum Bash Version is Met
# ? File Name: version.check.sh
# * Echo message, prefixed with timestamp.
# * Optionally, supports color name as argument to alter color of output.
function echoc () {
# * If no message has been passed, echo an empty line.