Skip to content

Instantly share code, notes, and snippets.

View kevinfodness's full-sized avatar

Kevin Fodness kevinfodness

View GitHub Profile
@kevinfodness
kevinfodness / formgetcontents.php
Created October 29, 2012 19:44
A PHP function to get an array of field names and default values from an HTML form on a remote server.
<?php
/**
* Contains a function to get the contents of a live form.
*
* PHP Version 5.3
*
* Requires the allow_url_fopen parameter to be set to true in php.ini.
*
* @category FormProcessing
@kevinfodness
kevinfodness / mailcatcher
Created August 19, 2014 16:27
An LSB script to treat mailcatcher as a service and start on boot.
#! /bin/sh
### BEGIN INIT INFO
# Provides: mailcatcher
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts mailcatcher.
# Description: This file starts the mailcatcher service on port 1081.
### END INIT INFO
@kevinfodness
kevinfodness / example-oembed-post.html
Created January 18, 2017 03:38
Example WordPress content with an oEmbed YouTube video
Example text
https://www.youtube.com/watch?v=KiS8rZBeIO0
More example text
@kevinfodness
kevinfodness / new-alley-bio.md
Last active January 24, 2018 02:21
New Alley bio

Kevin leads Alley's JavaScript practice, developing everything from front-end data visualizations to full-stack JavaScript applications written in React and Node. He has delivered JavaScript customizations to the front-end and editorial experience for Time Inc., as well as a full-stack data visualization tool for the National Science Foundation. He earned his PhD in Science and Technology Studies from Rensselaer Polytechnic Institute in 2016, with a focus on web accessibility. In his free time, he enjoys cooking and spending time with his wife and four children. He is based in the Lake George area of upstate New York.

@kevinfodness
kevinfodness / auth0-plugin-settings.json
Created May 13, 2019 14:34
Example Auth0 plugin settings export
{
"domain": "[REDACTED]",
"custom_domain": "",
"client_id": "[REDACTED]",
"client_secret": "[REDACTED]",
"client_signing_algorithm": "RS256",
"cache_expiration": 1440,
"auth0_app_token": null,
"wordpress_login_enabled": "link",
"password_policy": "fair",
@kevinfodness
kevinfodness / wordpress-embed-sample-urls.json
Last active April 7, 2020 11:06
A data file containing sample URLs for WordPress oEmbed or Gutenberg Embed block testing (credit to oembed.com for some of these)
[
{
"provider": "Amazon Kindle",
"url": "https://www.amazon.com/dp/B00E257T6C"
},
{
"provider": "Animoto",
"url": "https://animoto.com/play/WmGs0SgMeHvBMur0fL68rw"
},
{
@kevinfodness
kevinfodness / gutenberg-package-versions.js
Last active July 23, 2021 10:50
A node script for extracting @WordPress npm package versions from a git checkout of Gutenberg at a specific tag.
const metapackage = require('./gutenberg/package.json');
Object.keys(metapackage.dependencies)
.map((package) => package.replace(/^@wordpress\//, ''))
.forEach((package) => {
const packageJSON = require(`./gutenberg/packages/${package}/package.json`);
if (![
'edit-navigation',
'react-native-aztec',
'react-native-bridge',
'react-native-editor',