Skip to content

Instantly share code, notes, and snippets.

Avatar
🔨
Hammering Things Into Place

Tanner Record tarecord

🔨
Hammering Things Into Place
View GitHub Profile
@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active May 10, 2021
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
View cloudflare-ddns-update.sh
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@keesiemeijer
keesiemeijer / setup-phpunit.sh
Last active Dec 29, 2020
Setup PHPUnit for use in the Local by Flywheel app
View setup-phpunit.sh
#!/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.
@benlk
benlk / 0-toc.md
Last active May 11, 2021
Collection of notes on WP_UnitTestCase
View 0-toc.md
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
      • ?
@danielbachhuber
danielbachhuber / gist:7684646
Created Nov 27, 2013
How to integrate WordPress Core updates with your custom Plugin or Theme
View gist:7684646
<?php
/**
* How to integrate WordPress Core updates with your custom Plugin or Theme
*
* Filter the `update_plugins` transient to report your plugin as out of date.
* Themes have a similar transient you can filter.
*/
add_filter( 'site_transient_update_plugins', 'wprp_extend_filter_update_plugins' );
add_filter( 'transient_update_plugins', 'wprp_extend_filter_update_plugins' );
function wprp_extend_filter_update_plugins( $update_plugins ) {