Skip to content

Instantly share code, notes, and snippets.

View chuckreynolds's full-sized avatar
🤖
building things

Chuck Reynolds chuckreynolds

🤖
building things
View GitHub Profile
@chuckreynolds
chuckreynolds / clickerheroes-legit-game-save.txt
Created October 2, 2014 17:27
game saves for clickerheroes.com
egyRJi0tba3dRihBbJE0hQlhcVm99JMqZEXYZLlTbNHUMminOGj8MdzLNwTJIOs4I8nKRRvmd0GPF1saQYmH9JzicL0gtpprbIGjx4zeIGjeohxAMejXQEzxMDCPwAiRdgGa9V0JYUWfxFDKcEmIlh0jcpyRIp60MajjYY4DMDTJkLs8IanUBgyyZjXrZsM7bm2wd7p0bglcRiprbXWfV7z4dsGRFBtWcPCAIp6bM9TvQixFMyjLERySMlzkQuzKMUT7E9z9MbygwBiRdhGq9m0XYtWFxUVVcNGrd1yHY9WcR6lyc6yeIY6DMrTHU31uMkSQw5iAddGj9Z0AYBWBxrQ1cxm7lNtdYtWVxCzZSC27lGs5baGeVekWIqjfoIzzN1CfwjiEdBGDlutWZtWfxxhBcbH0NslOcSyxI36GM2Cuw9icbAGCFVzIdfFvBehrZ92bV1MzbT2dFAktVsGTlQtuZQSOIA6TMnCgwEiSbSWj9AzjdoExNcswabWBNSrwcD1PB0lYcXlINJlCYW2l9JuxZICpI96TMpjIQTs7Ilm9t3vcb5m0daJ6ZNCHIg6IIIicIJsCIRnwR1v9dYG8FEs4Q53jJplHZwGrld01ch11Bo11cQmTNiodYRXINdldZcCkIY6jMkC0w8iqdRmeVsyqck2Vl2vEbjimIx6RNNyqwWiQdxGJ9b0OYgWwxgNbbu2F5klJeRVjNAwfZhWa5u0qICjVonwCLYCmJotUYqXThhErc7HFMcimOrjmgauCMRzgIFx5MiTmAP3WMgDFYI2oNKzuEY3ENJzjVUliK1zAIX3bLbCbJ1zFb73YVjsgcf1CNewXZtWs5g0XIvjJolwmLdChJmzQb83GVGuGZsHmNzFUbzmZFOiqb8GZVTkgIljYpdmEYvWExozhZqStwji0c4HmJepQbsWlFisWUb289T1xbkHsMqiuOZjnEOsCI2mfxAhBcu3aRBM2bC2iFSkfVbGllctqZ3S9I06pMxCywuidbrX4VqzqaTWuNIFz
@chuckreynolds
chuckreynolds / current-weather-openweathermap.js
Created March 12, 2019 08:05
Open Weather Map API Current Weather, node js, javascript, axios
// API specific settings https://openweathermap.org/current
const API_URL = 'https://api.openweathermap.org/data/2.5/weather';
const API_KEY = '';
const LOCATION_CODE = '';
const FULL_API_URL = `${API_CURRENT_URL}?id=${LOCATION_CODE}&appid=${API_KEY}`;
axios
.get(FULL_API_CURRENT_URL)
.then(response => {
// Assign vars to response data
@chuckreynolds
chuckreynolds / wme-auth-postman.js
Last active August 8, 2024 18:08
This script manages the authentication process and token refresh mechanism for Wikimedia Enterprise API requests in Postman. It checks the validity of the access and refresh tokens before each request, performing re-authentication or token refresh as needed. The script uses environment variables to store tokens and their generation times, ensuri…
/**
* This script manages the authentication process and token refresh mechanism for Wikimedia Enterprise API requests in Postman.
* It checks the validity of the access and refresh tokens before each request, performing re-authentication or token refresh
* as needed. The script uses environment variables to store tokens and their generation times, ensuring the tokens are
* up-to-date and minimizing the need for repeated login requests.
*
* ## Author/Support
* - @chuckreynolds on X
* - e: creynolds@wikimedia.org
*
@chuckreynolds
chuckreynolds / wme-article-vs-structured-contents.md
Created August 6, 2024 00:33
As of 08-2024 fields unique and similar in On-demand API production endpoint v2/articles/ vs beta v2/structured-contents/ endpoints. https://enterprise.wikimedia.com/docs/on-demand/

/v2/articles/{name}

  • name, identifier, abstract, date_created, date_modified, date_previously_modified, version, previous_version, url, watchers_count, namespace, in_language, main_entity, additional_entities, categories, templates, redirects, is_part_of, article_body, license, event, image

Fields unique to v2/articles:

•	date_previously_modified
•	previous_version
•	watchers_count
•	namespace
•	categories
•	templates
@chuckreynolds
chuckreynolds / top-level-field-names-postman.js
Created August 5, 2024 18:35
Show Top-level field names in console on a Postman API response
// Parse the JSON response body
const responseBody = pm.response.json();
// Check if the response is an array and has elements
if (Array.isArray(responseBody) && responseBody.length > 0) {
// Get the keys (top-level field names) from the first object in the array
const topLevelFields = Object.keys(responseBody[0]);
// Log the top-level field names as a comma-separated string to the Postman console
console.log("Top-level field names in the JSON response: " + topLevelFields.join(', '));
@chuckreynolds
chuckreynolds / robots.txt
Last active July 17, 2024 16:57
Solid start Robots.txt for WordPress Sites. (HEADS UP: Make sure you're viewing the most recent version of this Gist) https://gist.github.com/chuckreynolds/135728/
# robots.txt for wordpress
# https://gist.github.com/chuckreynolds/135728
User-agent: *
Disallow: /*.php$
Disallow: /cgi-bin/
Disallow: /comment-page-*
Disallow: /?s=*
Disallow: /search/*
Disallow: /trackback/
@chuckreynolds
chuckreynolds / affiliate-links.md
Last active March 7, 2024 23:45
Chuck's Affiliate links storage
@chuckreynolds
chuckreynolds / antispambot-wordpress-shortcode.php
Created April 26, 2017 22:43
Antispambot WordPress shortcode function
<?php
/**
* Hide email from Spam Bots using a shortcode.
* Anti-Spambot Email Shortcode, v1.1.1
* https://wordpress.org/plugins/antispambot
*
* @param array $atts Shortcode attributes. Not used.
* @param string $content The shortcode content. Should be an email address.
*
* @return string The obfuscated email address.
@chuckreynolds
chuckreynolds / .zshrc
Last active January 7, 2024 20:05
ZSH w/ Oh-My-ZSH config file with bash alias
# 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"
fi
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
@chuckreynolds
chuckreynolds / abstract.json
Last active December 15, 2023 23:14
Wikimedia Enterprise API — Results for article "Squirrel" @ 2023 Dec 15. On-demand API response for Article Body, both Wikitext and HTML (provided exclusively by Wikimedia Enterprise), Abstract, Short Description fields, and beta endpoint resp for Infobox & article body Sections. https://enterprise.wikimedia.com
"abstract": " Squirrels are members of the family Sciuridae, a family that includes small or medium-size rodents. The squirrel family includes tree squirrels, ground squirrels, and flying squirrels. Squirrels are indigenous to the Americas, Eurasia, and Africa, and were introduced by humans to Australia. The earliest known fossilized squirrels date from the Eocene epoch, and among other living rodent families, the squirrels are most closely related to the mountain beaver and to the dormice.",