Skip to content

Instantly share code, notes, and snippets.

View dougbeal's full-sized avatar

Douglas Beal dougbeal

View GitHub Profile
@dougbeal
dougbeal / test.md
Created May 24, 2017 22:24
Exercise mdrip issue

bash

block0

pwd

block1

(cd .. && pwd)
function repeatSummonTickets(target) {
$('.gacha-result').text("");
$('.loading img').attr("src", "").attr("src", $('.loading img').data("src"));
$('.loading').show();
var obtained_5 = [];
var obtained_4 = [];
var obtained_3 = [];
var obtained = [];
@dougbeal
dougbeal / gist:d33bdd3ed8ff29cdfeaf176e25bcc5d2
Last active July 12, 2018 02:10
OwnYourGram fails to upload photo
failed upload
wordpress_1 | 172.18.0.4 - 12/Jul/2018:01:37:03 +0000 "POST /wp-admin/admin-ajax.php" 200
webserver-wordpress_1 | 98.237.185.120 - - [12/Jul/2018:01:37:03 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 34 "https://dougbeal.com/wp-admin/edit.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0" "-"
wordpress_1 | 172.18.0.4 - 12/Jul/2018:01:37:04 +0000 "POST /index.php" 400
webserver-wordpress_1 | 173.230.155.197 - - [12/Jul/2018:01:37:05 +0000] "POST /?micropub=endpoint HTTP/1.1" 400 121 "-" "-" "-"
webserver-wordpress_1 | 2018/07/12 01:37:05 [info] 5#5: *63642 client 173.230.155.197 closed keepalive connection
wordpress_1 | 172.18.0.4 - 12/Jul/2018:01:37:09 +0000 "POST /wp-cron.php" 200
webserver-wordpress_1 | 172.18.0.1 - - [12/Jul/2018:01:37:09 +0000] "POST /wp-cron.php?doing_wp_cron=1531359429.4462358951568603515625 HTTP/1.1" 200 5 "https://dougbeal.com/wp-cron.php?doing_wp_cron=1531359429.4462358951568603515625
@dougbeal
dougbeal / gist:831de0d3eea410de07ab662f3dd2def3
Created July 12, 2018 03:07
indieweb wordpress plugins
git submodule foreach git remote -v
Entering 'indieauth'
origin https://github.com/indieweb/wordpress-indieauth (fetch)
origin https://github.com/indieweb/wordpress-indieauth (push)
Entering 'indieweb'
origin https://github.com/indieweb/wordpress-indieweb.git (fetch)
origin https://github.com/indieweb/wordpress-indieweb.git (push)
Entering 'indieweb-post-kinds'
origin https://github.com/dshanske/indieweb-post-kinds.git (fetch)
origin https://github.com/dshanske/indieweb-post-kinds.git (push)
@dougbeal
dougbeal / gist:2c4a9c2b953feee91b43906a98d093b2
Last active July 12, 2018 04:26
https://🕸💍.ws indieauth to wordpress login error
The authorization server returned an invalid state parameter
[ 'Verifying ',
'WrxIqLF4eixqnpLnFpmf3A46UxA6KzTIfjVpRqa1ZDjac58sjt3CrujnifmVTvEa27oP3Y41Qt6g41ruxJewoTpJvKFRV2PiAhohOJ4nWuPqswKcfGSqBmfPvMhr9izu',
' with ',
{ me: 'https://dougbeal.com/',
@dougbeal
dougbeal / debug.php
Last active July 16, 2018 05:17
issue post kind missing start p tag
{"name":"Feature \u2013 WordPress \u2013 rel-issues link in plugin generated widget when in debug mode","summary":"WordPress debug mode could put link re-issues into each widget bit, and Press-This bookmarklet could allow selection of which one you want to file against\nDuplicate to somewhere","author":{"type":"card","name":"Douglas Beal","url":"https:\/\/dougbeal.com","photo":"https:\/\/secure.gravatar.com\/avatar\/4aef6f46cd0c5c51bbf5c15d4e66b35e?s=125&d=default&r=g"},"publication":"dougbeal","published":"2018-07-15T18:47:04-07:00","updated":"2018-07-15T21:38:48-07:00","url":"https:\/\/dougbeal.com\/2018\/07\/15\/feature-wordpress-rel-issues-link-in-plugin-generated-widget-when-in-debug-mode\/","raw":{"title":"Feature – WordPress – rel-issues link in plugin generated widget when in debug mode","type":"article","url":"https:\/\/dougbeal.com\/2018\/07\/15\/feature-wordpress-rel-issues-link-in-plugin-generated-widget-when-in-debug-mode\/","description":"Wordpress debug mode could put link re-issues
@dougbeal
dougbeal / parse-response.json
Last active July 19, 2018 05:13
link preview gone wrong
webserver-wordpress_1 | 71.212.132.198 - - [19/Jul/2018:04:51:06 +0000]
"GET /wp-json/link-preview/1.0/parse/?kindurl=https%3A%2F%2Fgithub.com%2Findieweb%2Fwordpress-indieweb%2Fissues&kind=issue HTTP/1.1"
200 4269
"https://dougbeal.com/wp-admin/post.php?post=2006&action=edit"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15"
"-"
@dougbeal
dougbeal / shelldown-demo
Created July 29, 2018 20:54 — forked from pjeby/shelldown-demo
"You got your markdown in my shell script!" "No, you got your shell script in my markdown!"

Mixed Markdown and Shell Scripting

: By the power of this magic string: ex: set ft=markdown ;:<<'```shell' #, this file is now both a markdown document and an executable shell script. chmod +x it and try running it!

The above line does just what it says. More specifically, when placed within in the first 5 lines and preceded only by blank lines or #-prefixed markdown headers:

  1. The first part of the magic string makes github and various editors (e.g. atom with the vim-modeline packge) treat the file as having markdown syntax (even if the file doesn't have an extension)
  2. The second part (if run in a shell), makes the shell skip execution until it encounters the next ```shell block.

(The line also has to start with a : so that it's valid shell code.)

/usr/share/nginx/html/wp-content/plugins/wordpress-micropub/phpunit.xml.dist
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 6.5.9 by Sebastian Bergmann and contributors.
....................EEE.......................................... 65 / 88 ( 73%)
....................... 88 / 88 (100%)
HTTP/1.1 400 Bad Request
Server: nginx/1.15.0
Date: Thu, 02 Aug 2018 04:03:21 GMT
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/7.2.6
Link: <https://dougbeal.com/wp-json/indieauth/1.0/token>; rel="token_endpoint"
Link: <https://dougbeal.com/?micropub=endpoint>; rel="micropub"
Expires: Wed, 11 Jan 1984 05:00:00 GMT