Skip to content

Instantly share code, notes, and snippets.

View chriszarate's full-sized avatar
👋
hi

Chris Zarate chriszarate

👋
hi
View GitHub Profile
@chriszarate
chriszarate / thumbnail.png
Last active March 17, 2021 00:57
Identify your tmux windows with food emoji
thumbnail.png
@chriszarate
chriszarate / update-site-urls.sh
Created March 2, 2015 16:53
WordPress Multisite HTTP to HTTPS migration
!/bin/bash
# WordPress Multisite HTTP to HTTPS migration
# Use wp-cli to assist HTTP to HTTPS migration for a WP Multisite installation.
# Update site metadata for the main site as well as each site in the network.
WP_PATH=/var/www
WPCLI_PATH=/home/admin/bin/wp-cli.phar
@chriszarate
chriszarate / vnc-over-ssh.sh
Created July 15, 2015 03:39
VNC over SSH via bastion
# You want to VNC to Box A but you don't have access to it
# over public Internet. You do have SSH access to Box B in
# the same private network.
# firewall
# ┌─────┐ ╏╏ ┌─────┐
# │ You │──SSH──╏╏────│ B │ bastion
# └─────┘ ╏╏ └──┬──┘
# ╏╏ SSH
# ╏╏ ┌──┴──┐
networkInterface.use([{
applyMiddleware(req, next) {
console.log(req.request);
next();
}
}]);
$ git add -p src
diff --git a/src/publish.js b/src/publish.js
index 196e8aa..e1fa7df 100644
--- a/src/publish.js
+++ b/src/publish.js
@@ -43,11 +43,10 @@ module.exports = async () => {
// Render aggregation pages.
await publishHtml( 'home', 'index.html', { posts } );
- await publishHtml( 'archive', 'archive', { posts } );
@chriszarate
chriszarate / debug-fastly.md
Last active June 1, 2020 16:47
Debug Fastly response

Debugging browser requests to Fastly objects

Fastly allows you to add a special header to your request which instructs it to include detailed cache information in the response. This information is useful in debugging cache issues, especially around max-age and surrogate keys.

In Firefox

Firefox's dev tools make it easy to edit and resend an HTTP request. Use this flow to add the Fastly debug header in the browser:

  1. Open Dev Tools and switch to the Network tab. You may need to refresh the page to capture the request for the current page.
@chriszarate
chriszarate / wp-graphql-co-authors-plus.php
Created March 1, 2022 00:45
WPGraphQL CoAuthorsPlus
<?php
/**
* Plugin Name: GraphQL integration with Co-Authors Plus
* Author: WPGraphQL
* Version: 0.1.0
* Requires at least: 5.0.0
*
* @package wp-graphql-co-authors-plus
*/