Skip to content

Instantly share code, notes, and snippets.

Andy Fragen afragen

Block or report user

Report or block afragen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
afragen / switch-dependency-label.php
Last active Jan 25, 2020
Switch the Plugin Dependency label of wp-dependency-installer
View switch-dependency-label.php
* Plugin Name: Switch Plugin Dependency Label
* Description: Switch location of WP Dependency Installer framework 'Plugin Dependency' label
* Author: Andy Fragen
* License: MIT
class Switch_Label {
protected $files = [];
afragen / .phpcs.xml
Last active Mar 28, 2020
My PHPCS rulesets using WPCS as a base.
View .phpcs.xml
<?xml version="1.0"?>
<ruleset name="WordPress-Beta-Tester">
<description>Keep long array syntax.</description>
<!-- Include main ruleset.xml -->
<rule ref="/Users/afragen/code-standards/ruleset.xml"/>
<rule ref="Generic.Arrays.DisallowShortArraySyntax" />
<!-- Use only long arrays -->
<rule ref="Generic.Arrays">
afragen / set-category-colors-hash.php
Created Oct 30, 2019
Set the Category Colors options hash to pre-defined hash
View set-category-colors-hash.php
* Plugin Name: Set Category Colors Options Hash
* Author: Andy Fragen
* Author URI:
* Version: 0.1
* Requires PHP: 5.3
add_filter( 'teccc_set_options_hash', function(){
afragen / aliases.zsh
Last active Apr 21, 2020
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"
afragen /
Last active Dec 13, 2019
Apply patches or change sets from tickets.
#!/usr/bin/env bash
# ====================================================================================
# Script to install patches or changesets to
# I use with Local Lightning by Flywheel by installing in `/app` directory.
# Patches and changesets are saved in `/tmp/` as a default.
# You will use the patch URL in the script.
# ====================================================================================
afragen / afragen.zsh-theme
Last active Sep 5, 2019
Modification of PROMPT in robbyrussell.zsh-theme
View afragen.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} $fg[grey]%m: %{$fg[cyan]%}${PWD/#$HOME/~}%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
afragen /
Last active Dec 14, 2019
Create WP Core development environments in Local Lightning
cd ..
mv ./public/wp-config.php .
rm -rf ./public
git clone git:// public
ln -sv $PWD/wp-config.php $PWD/public/wp-config.php
curl -o ./public/.gitignore
curl -o
curl -o
cd public/
afragen /
Created Jul 27, 2019 — forked from keesiemeijer/
Setup PHPUnit for use in the Local by Flywheel app
#!/usr/bin/env bash
# ===============================================================================
# Script to install PHPUnit in the Local by Flywheel Mac app
# These packages are installed
# PHPUnit, curl wget, rsync, git, subversion and composer.
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit.
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory.
View get_array_of_release_assets.php
$config = [
//'token' => '012345',
'repo' => 'satispress',
'username' => 'cedaro',
$file_location = 'releases/';
$file_name = '';
View .gitignore
You can’t perform that action at this time.