Skip to content

Instantly share code, notes, and snippets.

@nathanieltubb
nathanieltubb / mailcatcher.md
Last active December 7, 2017 03:11
Enabling Mailcatcher for local PHP debugging.

Mailcatcher

https://mailcatcher.me/

This is a Ruby gem which collects outgoing email messages from your app and displays them in a webmail portal.

The general install directions are provided on the site, however there are several variances with my own developement environment which have proved a challenge.

Using RVM?

@nathanieltubb
nathanieltubb / .bash_profile
Last active March 27, 2018 01:03 — forked from yosukehasumi/.bash_profile
My Bash Profile
source ~/.profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Credit: This profile is forked from Yosuke Hasumi's bash profile example:
# https://gist.github.com/yosukehasumi/fb5c97f661ee3d4e1b41049707606fb5
#
# Sections:
@nathanieltubb
nathanieltubb / wpupdateall
Created May 7, 2018 18:43
Grouping frequently used WP CLI update commands.
#!/bin/bash
wp core update
wp plugin list
wp plugin update --all
wp core language update
@nathanieltubb
nathanieltubb / installblankwordpress
Last active December 11, 2018 04:35
Install Blank WordPress with WP CLI
#!/bin/bash
# This Bash script requires WP CLI be installed and executeable as 'wp'.
# 1. Create your database and user as needed.
# 2. Create the directory you want WP to install in
# 3. 'cd' into that directory
# 4. Run this script
# IMPORTANT! This is a modified version of the base 5-minute install which removes
# and resets some of the default content and options. This is not meant to be used
# with existing WP installs or databases.
@nathanieltubb
nathanieltubb / front-end-scrape-links.js
Last active May 17, 2019 21:54
WordPress Link Map CSV
@nathanieltubb
nathanieltubb / acf-php-fields-to-json.php
Last active November 19, 2019 13:50
Return ACF Field Groups In JSON If You Only Have PHP. Revised code from this post David Egan - https://dev-notes.eu/2017/01/convert-acf-fields-registered-by-php-to-importable-json-format/
<?php
include_once '../wp-load.php';
$groups = acf_get_local_field_groups();
$json = [];
foreach ($groups as $group) {
// Fetch the fields for the given group key
$fields = acf_get_fields($group['key']);