Skip to content

Instantly share code, notes, and snippets.


Andy Fragen afragen

View GitHub Profile
afragen / phpcs.xml
Last active March 18, 2023 19:57
phpcs files for my plugins and core plugins
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="AJF-Coding-Standards">
<description>A custom ruleset to take in account both WordPress and personal standards.</description>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- Exclude these -->
afragen / aliases.zsh
Last active March 18, 2023 04:44
My oh-my-zsh aliases
View aliases.zsh
alias wp-git-core="sh -c \"\$(curl -fsSL\";cd ."
alias wp-git-develop="sh -c \"\$(curl -fsSL\";cd ."
alias local-socket="SOCKET=\$(mysqld --verbose --help | grep ^socket | awk '{print \$2, \$3, \$4}');ln -sfv \$SOCKET /tmp/mysql.sock"
alias brewup="brew update && brew upgrade && brew cleanup && brew doctor"
#lsof -i | grep LISTEN | grep 'nginx\|httpd'
alias http-listen="lsof -i | grep LISTEN | grep 'nginx\|httpd'"
afragen /
Last active February 14, 2023 21:10 — forked from mirhec/
Installing Gitea on Raspberry Pi 3 b+ with nginx and automatic backups

Setup Gitea on Raspberry Pi (3b+)

These instructions are based on this article:

Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:

Use Noobs to install Raspian.

Open menu Preferences > Raspberry Pi Settings

afragen / php.ini.hbs
Last active January 11, 2023 22:29
Stuff for xDebug 3.x and Local
View php.ini.hbs
; Add to all lightning services PHP conf files using xDebug 3.x
; Add to all lightning services PHP conf files using xDebug 2.x
afragen / auto-flush-object-cache.php
Last active December 25, 2022 10:25
Catches 'PHP Fatal error Allowed memory size of xxxxxxx bytes exhausted' and 'RedisException' debug.log messages and flushes object cache.
View auto-flush-object-cache.php
* Auto-flush object cache.
* @package Fragen\Auto_Flush_Cache
* Plugin Name: Auto-Flush Object Cache
* Plugin URI:
* Description: Auto-flush the object cache when error log records PHP Fatal error for allowed memory size.
* Version: 0.7.0
afragen / karma.php
Last active December 1, 2022 15:41
Impose karma on specific users
View karma.php
* Karma.
* @package Fragen\Karma
* Plugin Name: Karma
* Plugin URI:
* Description: Impose karma on users.
* Version: 0.5.1
afragen / rollback-testing.php
Last active November 7, 2022 13:28
Plugin to simulate plugin/theme update failure for testing Rollback Update Failure feature plugin.
View rollback-testing.php
* Rollback Update Testing
* @package rollback-update-testing
* @author Andy Fragen <>
* @license MIT
afragen / git-updater-fastspring-popup.php
Created November 3, 2022 23:34
Add javascript for FastSpring's Git Updater popup store.
View git-updater-fastspring-popup.php
* Add FastSpring popup store script for Git Updater.
* @package FastSpringPopUpStore
* Plugin Name: FastSpring Popup Store for Git Updater
* Plugin URI:
* Description: Add FastSpring popup store javascript for Git Updater.
* Version: 0.1.0
View stop-plugin-auto-update-success-email.php
* Stop success email from plugin auto-updates.
* @package StopAutoUpdateSuccessEmail
* Plugin Name: Stop Plugin Auto-update Success Email
* Plugin URI:
* Description: Stop success email from plugin auto-updates.
* Version: 0.1.0
afragen / add-plugin-dependency-api.php
Last active September 3, 2022 00:15
Add to Dependencies tab via Git Updater PRO REST API
View add-plugin-dependency-api.php
* Add Plugin Dependency via REST API.
* @package Fragen\Plugin_Dependency_API
* Plugin Name: Add Plugin Dependency via REST API
* Plugin URI:
* Description: Add plugin dependency data to Dependencies tab via REST API endpoint and allow for Install Now button to function.
* Version: 0.11.3