Skip to content

Instantly share code, notes, and snippets.

building things

Chuck Reynolds chuckreynolds

building things
Block or report user

Report or block chuckreynolds

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
Oceas / wds-hello-world.php
Last active Oct 9, 2019
WDS WP-CLI 101 Complete
View wds-hello-world.php
Plugin Name: WDS Hello World
Plugin URI:
Description: Teaching the basics of WP-CLI
Author: Web Dev Studios
Version: 1.0.0
Author URI:
class WDS_CLI {
tessak22 / functions.php
Created Mar 12, 2019
Hero Gutenberg Block using Advanced Custom Fields 5.8 Pro
View functions.php
* Register hero block
add_action('acf/init', 'hero');
function hero() {
// check function exists
if( function_exists('acf_register_block') ) {
// register a hero block
drewm / shoot-sharing-image.js
Last active Dec 29, 2019
Dynamic Social Sharing Images
View shoot-sharing-image.js
const puppeteer = require('puppeteer');
const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');
// Get the URL and the slug segment from it
const url = process.argv[2];
const segments = url.split('/');
const slug = segments[segments.length-2];
(async () => {
AdamSoucie / gist-block.js
Created Aug 17, 2018
Block.js file for Gist Gutenberg Block
View gist-block.js
* BLOCK: wds-gist
// Import CSS.
import './style.scss';
import './editor.scss';
const { __ } = wp.i18n; // Import __() from wp.i18n
const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
pento / php-block.js
Last active Jan 14, 2020
Converting a shortcode to a block: this method is fast to do, but a mediocre UX. You should only use this as a stopgap until you can implement a full block UI.
View php-block.js
// License: GPLv2+
var el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
ServerSideRender = wp.components.ServerSideRender,
TextControl = wp.components.TextControl,
InspectorControls = wp.editor.InspectorControls;
* Here's where we register the block in JavaScript.
jono-alderson / userAgentSEO.php
Last active Nov 29, 2018
Looks up the user agent against a known list, and outputs a HTML comment
View userAgentSEO.php
// Quick script to check and output the user agent in a HTML comment
// Jono Alderson []
// =================================
// Google user agent strings are sourced from
// []
// Feel free to add/edit definitions
// =================================
// Last updated: 20/03/2018
smiley /
Last active Jan 6, 2020
How to make an automatic "stream's live" notification for your Discord server

Making an automatic Twitch -> Discord notification (using IFTTT)

So you went live and you want everyone to know. Here's how you do it:

Part 1 - Register on IFTTT

Go to and create an account (if you don't already have one)

Part 2 - Make a Discord Webhook

  • Find the Discord channel in which you would like to send Tweets.
  • In the settings for that channel, find the Webhooks option and create a new webhook. Note: This URL should be kept private. It allows anyone to write messages to that specific channel using that specific URL. Keep it safe!
matthewzring /
Last active Jan 1, 2020
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

guydumais / functions.php
Last active Dec 14, 2018
WordPress ➧ Disable jQuery Migrate in WordPress
View functions.php
* Disable jQuery Migrate in WordPress.
* @author Guy Dumais.
* @link
add_filter( 'wp_default_scripts', $af = static function( &$scripts) {
if(!is_admin()) {
$scripts->remove( 'jquery');
eslachance / index.js
Last active Jan 22, 2020
Simple, complete example of a bot in Discord.js
View index.js
// Load up the discord.js library
const Discord = require("discord.js");
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
const client = new Discord.Client();
// Here we load the config.json file that contains our token and our prefix values.
const config = require("./config.json");
You can’t perform that action at this time.