Skip to content

Instantly share code, notes, and snippets.

building things

Chuck Reynolds chuckreynolds

building things
View GitHub Profile
chuckreynolds / clickerheroes-legit-game-save.txt
Created October 2, 2014 17:27
game saves for
View clickerheroes-legit-game-save.txt
chuckreynolds / wordpress-change-domain-migration.sql
Last active February 10, 2023 18:56
UPDATE: Use WP-CLI find-replace command to edit URLs in your database. Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: al…
View wordpress-change-domain-migration.sql
/* Use WP-CLI instead */
SET @oldsite='';
SET @newsite='';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
chuckreynolds / shopify-products-json-async-await.html
Created June 15, 2018 03:13
Vanilla Javascript fetch Shopify Products JSON with Async Await. Built as a text case for something. Just change the domain in line 17 to whatever shopify domain. Display is just basic for display purposes. Comments / code review welcome.
View shopify-products-json-async-await.html
.wrapper {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 220px));
grid-gap: 20px;
.box {
background-color: #ebebeb;
chuckreynolds /
Last active December 12, 2022 18:50
Chuck's Affiliate links storage
chuckreynolds /
Last active December 12, 2022 08:33
Nightbot commands reference for Twitch and sometimes youtube gaming. Most are accessible via google and reading many docs but I like to keep things in one location for reference. If you want to see something here lmk on Twitter: or comment below.

General stuff

Add, Edit, Delete Commands

  • !addcom !keyword New text here
  • !editcom !keyword Edited version of the text here
  • !delcom !keyword

Reference the user whom entered command

  • $(user)

Reference user-entered text

chuckreynolds / .zshrc
Last active November 12, 2022 04:35
ZSH w/ Oh-My-ZSH config file with bash alias
View .zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/" # This loads nvm
chuckreynolds / current-weather-openweathermap.js
Created March 12, 2019 08:05
Open Weather Map API Current Weather, node js, javascript, axios
View current-weather-openweathermap.js
// API specific settings
const API_URL = '';
const API_KEY = '';
const LOCATION_CODE = '';
.then(response => {
// Assign vars to response data
chuckreynolds / wordpress-remove-block-suggestions.php
Created October 7, 2022 17:30
WordPress Remove Block Suggestions when viewing the Block Directory in WP Admin.
View wordpress-remove-block-suggestions.php
// Remove Block Suggestions in wp-admin Block Directory
function chuckdev_remove_block_directory() {
"wp.domReady( () => wp.plugins.unregisterPlugin( 'block-directory' ) )"
add_action( 'admin_enqueue_scripts', 'chuckdev_remove_block_directory' );
chuckreynolds / local-dev-remote-images.php
Created April 3, 2015 06:22
WordPress local dev environment plugin and config to use images from a live server instead of looking on local url path
View local-dev-remote-images.php
* Plugin Name: Local Dev Remote Images
* Description: this will allow a local dev environment to call all images in uploads from a remote server
* Version: 0.1
* License: GPL
* Author: @chuckreynolds
* Author URI:
chuckreynolds / disable-rest-endpoints.php
Created February 20, 2017 02:03
WordPress: Disable WP REST API JSON endpoints if user not logged in
View disable-rest-endpoints.php
* Disable WP REST API JSON endpoints if user not logged in
function chuck_disable_rest_endpoints( $access ) {
if( ! is_user_logged_in() ) {
return new WP_Error( 'rest_cannot_access', __( 'Only authenticated users can access the REST API.', 'disable-json-api' ), array( 'status' => rest_authorization_required_code() ) );
return $access;