Skip to content

Instantly share code, notes, and snippets.

View bgoewert's full-sized avatar
📈
stonks

Brennan Goewert bgoewert

📈
stonks
View GitHub Profile
@rawmain
rawmain / inlineZARAZ.js
Last active September 3, 2024 13:16
Client ID (cid) dynamic override for Cloudflare ZARAZ GA3 & GA4 tools
<script src="/jeeg.js"></script>
<script src="/cdn-cgi/zaraz/i.js" referrerpolicy="origin"></script>
// Include these lines in every webpage you want to collect pageview hits
// in its HTML, immediately before the </head> tag closes.
@Sevaarcen
Sevaarcen / bulk-convert-png-to-webp.ps1
Last active March 1, 2022 20:56
Bulk Convert PNG to WEBP
# https://developers.google.com/speed/webp/download
Get-ChildItem -Path . -File -Depth 0 | ForEach-Object -Parallel { &'C:\Program Files\libwebp\bin\cwebp.exe' -q 75 "$_" -o "$([io.path]::GetFileNameWithoutExtension($_)).webp" } -ThrottleLimit 16
@CruelDrool
CruelDrool / update-test.php
Last active February 3, 2025 21:22
Example of using "Update URI" (new in WordPress 5.8)
<?php
/*
Plugin Name: Testing Update URI
Author: Test Doe
Author URI: https://example.com
Update URI: https://example.com/current.json
Plugin URI: https://example.com
Description: This is a test plugin to test out the new plugin header field "Update URI".
Version: 1.0.0
*/
@paulgoodchild
paulgoodchild / functions.php
Last active December 10, 2021 15:29
Add custom user roles to enforce 2FA by email using Shield Security plugin for WordPress
<?php
/**
* Adding custom roles is a case of using the filter provided, adding your
* roles to the array of roles that has 2FA by email forced upon them.
*
* The role you add will be the 'slug' of the role, not the name of the role.
* For example, WordPress comes with built-in roles such as Administrator.
* The slug for this role is 'administrator', not 'Administrator'.
*/
@aslamdoctor
aslamdoctor / wsl-lamp.md
Last active December 17, 2024 19:41
Windows 10 - WSL LAMP Stack Setup
@Fuwn
Fuwn / README.md
Last active May 3, 2025 20:53
Windows XP All Editions Universal Product Keys Collection.

Windows XP Logo

Although Microsoft does not support Windows XP updates any more, I'm sure there are still many users using it due to their personal habits or job demands. Therefore, XP's product keys may be necessary even now. Here lies the most comprehensive list of Windows XP product keys.

The following CD keys are official and original from Microsoft, mainly used for Windows XP Professional Service Pack 2/3 VOL/VLK system images, which are the easiest ones to find on the Internet.

@simply-coded
simply-coded / ArrayList.vbs
Created May 31, 2017 20:55
Use lists in VBScript.
'create an arraylist
Set list = CreateObject("System.Collections.ArrayList")
'add values
list.add "mike"
list.add "jeremy"
list.add "kate"
list.add "alice"
'add a bunch of values easily via custom sub
@tameemsafi
tameemsafi / emails.php
Last active July 29, 2024 21:04
Send an email programmatically in wordpress with wp_mail using the woocommerce transaction emails template.
<?php
// Define a constant to use with html emails
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8'));
// @email - Email address of the reciever
// @subject - Subject of the email
// @heading - Heading to place inside of the woocommerce template
// @message - Body content (can be HTML)
function send_email_woocommerce_style($email, $subject, $heading, $message) {
@Saissaken
Saissaken / Update git fork with tags.sh
Last active April 6, 2025 04:17
Update git fork with tags
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone https://github.com/superteam/myframework.git
cd myframework
git remote add upstream https://github.com/someuser/myframework.git
# Update:
git fetch upstream
@DevinWalker
DevinWalker / woocommerce-optimize-scripts.php
Last active March 24, 2025 13:09
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );