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
View clickerheroes-legit-game-save.txt
egyRJi0tba3dRihBbJE0hQlhcVm99JMqZEXYZLlTbNHUMminOGj8MdzLNwTJIOs4I8nKRRvmd0GPF1saQYmH9JzicL0gtpprbIGjx4zeIGjeohxAMejXQEzxMDCPwAiRdgGa9V0JYUWfxFDKcEmIlh0jcpyRIp60MajjYY4DMDTJkLs8IanUBgyyZjXrZsM7bm2wd7p0bglcRiprbXWfV7z4dsGRFBtWcPCAIp6bM9TvQixFMyjLERySMlzkQuzKMUT7E9z9MbygwBiRdhGq9m0XYtWFxUVVcNGrd1yHY9WcR6lyc6yeIY6DMrTHU31uMkSQw5iAddGj9Z0AYBWBxrQ1cxm7lNtdYtWVxCzZSC27lGs5baGeVekWIqjfoIzzN1CfwjiEdBGDlutWZtWfxxhBcbH0NslOcSyxI36GM2Cuw9icbAGCFVzIdfFvBehrZ92bV1MzbT2dFAktVsGTlQtuZQSOIA6TMnCgwEiSbSWj9AzjdoExNcswabWBNSrwcD1PB0lYcXlINJlCYW2l9JuxZICpI96TMpjIQTs7Ilm9t3vcb5m0daJ6ZNCHIg6IIIicIJsCIRnwR1v9dYG8FEs4Q53jJplHZwGrld01ch11Bo11cQmTNiodYRXINdldZcCkIY6jMkC0w8iqdRmeVsyqck2Vl2vEbjimIx6RNNyqwWiQdxGJ9b0OYgWwxgNbbu2F5klJeRVjNAwfZhWa5u0qICjVonwCLYCmJotUYqXThhErc7HFMcimOrjmgauCMRzgIFx5MiTmAP3WMgDFYI2oNKzuEY3ENJzjVUliK1zAIX3bLbCbJ1zFb73YVjsgcf1CNewXZtWs5g0XIvjJolwmLdChJmzQb83GVGuGZsHmNzFUbzmZFOiqb8GZVTkgIljYpdmEYvWExozhZqStwji0c4HmJepQbsWlFisWUb289T1xbkHsMqiuOZjnEOsCI2mfxAhBcu3aRBM2bC2iFSkfVbGllctqZ3S9I06pMxCywuidbrX4VqzqaTWuNIFz
@chuckreynolds
chuckreynolds / local-dev-remote-images.php
Created Apr 3, 2015
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
<?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: https://chuckreynolds.us
*/
@chuckreynolds
chuckreynolds / common-terminal-commands.md
Last active Sep 3, 2019
Common linux / terminal commands I always use but forget. So fuck it I'm saving em here
View common-terminal-commands.md

common terminal commands

ubuntu updates & clean

  • sudo apt update && sudo apt upgrade -y
  • sudo apt autoremove && sudo apt clean

copy mac public ssh key

  • pbcopy < ~/.ssh/id_rsa.pub

edit host file and flush dns after

@chuckreynolds
chuckreynolds / wordpress-change-domain-migration.sql
Last active Aug 28, 2019
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: always backup your database. __STEP2: change the ‘oldsite.com’ and ‘newsite.com’ variables to your own. __STEP3: make sure your databa…
View wordpress-change-domain-migration.sql
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
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 */
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);
@chuckreynolds
chuckreynolds / stopwatch.php
Created Jul 27, 2016
Simple "StopWatch" class to measure PHP execution time. The class can handle multiple separate timers at the same time
View stopwatch.php
<?php
class StopWatch {
/**
* @var $startTimes array The start times of the StopWatches
*/
private static $startTimes = array();
/**
* Start the timer
*
View lazy-load-youtube-embed.html
<!DOCTYPE html>
<html>
<head>
<title>Lazy load youtube embed</title>
<meta charset="UTF-8" />
</head>
<body>
<main>
<h1>Example of a lazy loaded embedded YouTube video</h1>
<iframe
@chuckreynolds
chuckreynolds / robots.txt
Last active Aug 17, 2019
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/
View robots.txt
# robots.txt for wordpress
# https://gist.github.com/chuckreynolds/135728
User-agent: *
Disallow: /cgi-bin/
Disallow: /trackback/
Disallow: /comment-page-*
Disallow: /?s=*
Disallow: /*.php$
@chuckreynolds
chuckreynolds / affiliate-links.md
Last active Aug 12, 2019
Chuck's Affiliate links storage
View affiliate-links.md
@chuckreynolds
chuckreynolds / fetch-dadjoke-api.php
Last active Aug 8, 2019
Fetches a dad joke from icanhazdadjoke.com
View fetch-dadjoke-api.php
<?php
$url = 'https://icanhazdadjoke.com/';
$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);
curl_close($ch);
echo $data;
@chuckreynolds
chuckreynolds / Wordpress .HTACCESS file
Created Jun 25, 2009
Hardened .htaccess file for WP installs
View Wordpress .HTACCESS file
# canonical redirect to no www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# protect wp-config at all cost
<files wp-config.php>
Order deny,allow
deny from all
</files>
You can’t perform that action at this time.