Skip to content

Instantly share code, notes, and snippets.

View chrisaldrich's full-sized avatar

Chris Aldrich chrisaldrich

View GitHub Profile
@chrisaldrich
chrisaldrich / keybase.md
Created August 24, 2016 17:49
Keybase.io Gist

Keybase proof

I hereby claim:

  • I am chrisaldrich on github.
  • I am chrisaldrich (https://keybase.io/chrisaldrich) on keybase.
  • I have a public key whose fingerprint is 1B01 E63A 0E9D 6B26 83AE 2ADF 2F2D 7FAE CFC5 1FB6

To claim this, I am signing this object:

@chrisaldrich
chrisaldrich / tweet-status.php
Created January 25, 2017 20:06 — forked from cdevroe/tweet-status.php
Publish posts, statuses, images, to Twitter from WordPress
<?php
/**
* Plugin Name: Tweet Statuses
* Description: A simple plugin that will tweet a status when published.
* Author: Colin Devroe
* Author URI: http://cdevroe.com/
* Version: 0.1.0
*
* TwitterAPIExchange is here: http://github.com/j7mbo/twitter-api-php
*/
/* Tweaks to post kinds */
#kind-all .svg-icon {
fill: currentColor;
padding-left: 2px;
padding-right: 2px;
width: 48px;
height: 48px;
vertical-align: middle;
top: -0.0625em;
color: grey;
@chrisaldrich
chrisaldrich / kind-follow.php
Created April 19, 2018 23:24
Template for the follow kind for Post Kinds Plugin for WordPress
<?php
/*
* Follow Template
*
*/
$mf2_post = new MF2_Post( get_the_ID() );
$cite = $mf2_post->fetch();
if ( ! $cite ) {
return;
@chrisaldrich
chrisaldrich / kind-acquisition.php
Created April 20, 2018 02:20
View template for Post Kinds Plugin for WordPress
<?php
/*
* Acquisition Template
*
*/
$mf2_post = new MF2_Post( get_the_ID() );
$cite = $mf2_post->fetch();
if ( ! $cite ) {
return;
@chrisaldrich
chrisaldrich / homepage-flexbox-menu.html
Last active May 19, 2019 17:16
Code for generating the flexbox menu of post kinds on my homepage
/* Code for the itemized menu on my homepage */
<ul class="flex-menu">
<li class="flex-item">[icon name="file-text" class="" unprefixed_class=""] <a title="Longerform content (Traditional blog)" href="/kind/article/">Articles</a></li>
<li class="flex-item">[icon name="sticky-note" class="" unprefixed_class=""] <a title="Status updates and short notes" href="/kind/note/">Notes</a></li>
<li class="flex-item">[icon name="reply" class="" unprefixed_class=""] <a title="Replies to content on other sites" href="/kind/reply/">Replies</a></li>
<li class="flex-item">[icon name="microphone" class="" unprefixed_class=""] <a title="My short podcast episodes on various topics" href="/category/microcast/">Microcast</a></li>
<li class="flex-item">[icon name="location-arrow" class="" unprefixed_class=""] <a title="Places I've visited" href="/category/checkin/">Checkins</a></li>
<li class="flex-item">[icon name="music" class="" unprefixed_class=""] <a title="Audio files I've found interesting" href="/type/audio">A
@chrisaldrich
chrisaldrich / monocle-error.txt
Created August 15, 2018 05:02
monocle error
Error
There was a problem trying to load the channels from your Microsub endpoint.
Microsub endpoint: https://aperture.p3k.io/microsub/16
Your website: https://boffosocko.com/
The endpoint returned the following response.
{
"code": 403,
"header": "HTTP/1.1 403 Forbidden\r\nServer: nginx/1.14.0\r\nContent-Type: application/json\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nX-Powered-By: PHP/7.2.7-1+ubuntu16.04.1+deb.sury.org+1\r\nCache-Control: no-cache, private\r\nDate: Wed, 15 Aug 2018 04:59:01 GMT",
@chrisaldrich
chrisaldrich / OYS micropub error
Created August 25, 2018 19:02
Micropub errors for OYS 8-25-18 (using master branch from 2018-08-24 ef76125)
[25-Aug-2018 18:42:04 UTC] Micropub Error: 403 forbidden - Unauthorized
[25-Aug-2018 18:42:04 UTC] REST request: /micropub/1.0/endpoint: {"type":["h-entry"],"properties":{"published":["2018-08-24T17:44:13-07:00"],"syndication":["https:\/\/www.swarmapp.com\/user\/11479\/checkin\/5b80a65de0c0c9002c0c8589"],"content":["Being lazy for dinner tonight."],"photo":["https:\/\/igx.4sqi.net\/img\/general\/original\/11479_Z5VSLqOla8M3LhlRo_7QKUXeiGvaufQM1NTUYg32Dp0.jpg"],"checkin":[{"type":["h-card"],"properties":{"name":["Gerrish Grill"],"url":["https:\/\/foursquare.com\/v\/5b66159f2db4a9002ce66d2b"],"latitude":[34.1745],"longitude":[-118.09457],"locality":["Pasadena"],"region":["CA"],"country-name":["United States"],"postal-code":["91107"]},"value":"https:\/\/foursquare.com\/v\/5b66159f2db4a9002ce66d2b"}],"location":[{"type":["h-adr"],"properties":{"latitude":[34.1745],"longitude":[-118.09457],"locality":["Pasadena"],"region":["CA"],"country-name":["United States"],"postal-code":["91107"]}}]}}(Header Absent)
[25-Aug-2
@chrisaldrich
chrisaldrich / ApertureError
Created April 22, 2019 23:11
Error response from Aperture
Error
There was a problem trying to load the channels from your Microsub endpoint.
Microsub endpoint: https://aperture.p3k.io/microsub/16
Your website: https://boffosocko.com/
The endpoint returned the following response.
{
"code": 403,
"header": "HTTP/1.1 403 Forbidden\r\nServer: nginx/1.14.0\r\nContent-Type: application/json\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nX-Powered-By: PHP/7.2.7-1+ubuntu16.04.1+deb.sury.org+1\r\nCache-Control: no-cache, private\r\nDate: Mon, 22 Apr 2019 23:10:18 GMT",
@chrisaldrich
chrisaldrich / IndieAuth tool
Created April 22, 2019 23:20
IndieAuth tool
Test Authorization Headers
URL of this page
https://boffosocko.com/wp-content/plugins/indieauth/authdiag.php
Run Test
Summary Results
$_SERVER['HTTP_AUTHORIZATION'] is unavailable on this server. You may need to change some configurations to get tools working.
$_SERVER['REDIRECT_HTTP_AUTHORIZATION'] is available on this server! This can be used as a fallback for $_SERVER['HTTP_AUTHORIZATION'].
Tools may use getallheaders(), but the authorization header was not found there.