Skip to content

Instantly share code, notes, and snippets.

building things

Chuck Reynolds chuckreynolds

View GitHub Profile
View astros-affiliate-link-hops.txt
chuckreynolds / current-weather-openweathermap.js
Created Mar 12, 2019
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
View dict.json
"provider":"Oxford University Press"
chuckreynolds / wordpress-get-child-page-ids.php
Created Feb 5, 2019
Gotta be a better way to get an array of Child Page IDs than this. WordPress
View wordpress-get-child-page-ids.php
// basic idea here is a common function to pass a parent page ID
// and get back an array of it and its child page IDs only
function getChildPageIDs( $id ) {
$child_pages = get_pages('child_of='.$id);
$ids_to_remove = array($id); // we want to remove parent id too
foreach($child_pages as $child) {
array_push($ids_to_remove,$child->ID); // for every child add the id into array
chuckreynolds / remove-jquery-migrate-wordpress.php
Created Jan 28, 2019
Removes jQuery Migrate script from WordPress. Reason: modern browsers don't need this anymore.
View remove-jquery-migrate-wordpress.php
* Remove jQuery Migrate script
function ryno_remove_jquery_migrate( $scripts ) {
if ( isset( $scripts->registered['jquery'] ) ) {
$script = $scripts->registered['jquery'];
if ( $script->deps ) { // Check whether the script has any dependencies
$script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) );
chuckreynolds / fetch-dadjoke-api.php
Last active Dec 28, 2018
Fetches a dad joke from
View fetch-dadjoke-api.php
$url = '';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept:text/plain']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
echo $data;
chuckreynolds / json-discord-embeds-twitch.json
Last active Aug 23, 2018
JSON embed scripts for Discord webhooks via IFTTT. Allowed avatar_url to be dictated by Discord in the webhook config.
View json-discord-embeds-twitch.json
"username":"{{ChannelName}} [via RynoBot]",
"content":"@everyone {{ChannelName}} just went LIVE on Twitch! See you in chat! clintusHYPE",
chuckreynolds / shopify-products-json-async-await.html
Created Jun 15, 2018
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 Feb 15, 2019
Chuck's Affiliate links storage
View gist:3509561dda65df35075f87fb7adc629e
Verifying that "" is my Blockstack ID.
You can’t perform that action at this time.