Jul 20, 2021

先週末、486のPCを買いました。この頃、486プロセッサを搭載したコンピュータは希少です。たぶんのを見たことがありません。とても古いです。

古いコンピュターが大好きです。若すぎて486を使うことができませんでした、でも私の一番台x86のコンピュターはPentiumでした。けれども押し入れで父の286と386と486がありました。

Cyrixの486DX2とマザーボード

いくつか眠れなかった夜はのを出しました。ぜんぜん分かりませんでした。ヒントが与えませんでした。12歳に486を使うことが大変でした。けれども、いま大人です。もう一度やりたい。

見つけるには簡単じゃなかったです。私の町でいたるところを探しました、でもみんなとすべての店は古いコンピュターをレサイクルします。シアトルのリサイクルショップに行きました。

シアトルのリサイクルショップ、RE・PC

ところが、一台がありませんでした、でも2つのマザーボードとシーピーユーがありました! 家に一つを持って来ました。ほか古くてランダムなパーツにもたくさん買いました!

猫はコンピューターの修理のが上手です。

いまパーツが足りません。電源回路がありません。PCケースは非対応。リボンケーブルは新しくて過ぎます。いくつかのパーツが駄目かもね。

取り合わせるのときに、また書きます。


Apologies, I am learning Japanese and figured some less interesting projects could make good writing prompts for practice. すみません。書きます、でもまだ上手じゃありません。

Jul 8, 2021

I recently received complaints from WordPress multisite users about not being able to embed iframes for Google calendars. Upon testing, I found nothing wrong–embeds worked absolutely fine.

My users kept insisting they disappeared, though, and could prove it with screenshots.

Nothing was off about their browsers. Nothing strange was happening with plugins. They’d just create a Custom HTML block, and then paste a totally normal <iframe> embed in, like so:

<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" width="560" height="315" frameborder="0"></iframe>

As soon as they clicked publish and left the page, poof! Gone.

It seems this was a change in security policy in Gutenberg. I’m not sure when this change happened, but if one of your multisite users (even an administrator!) wants to place iframes or a <script> tag into a Custom HTML block, WordPress will simply delete it.

This isn’t hard to change, luckily. You just need to add a filter to wp_kses_allowed_html. The best way to do this would be with a plugin. It would look like this:

<?php
/*
Plugin Name: Allow iframe Tags in Editor
Description: Allows use of iframe tags in Custom HTML block for non-super-admins.
Author: Joshua Woehlke
*/

function allow_iframes( $allowedposttags ){

	$allowedposttags['iframe'] = array(
		'align' => true,
		'allow' => true,
		'allowfullscreen' => true,
		'class' => true,
		'frameborder' => true,
		'height' => true,
		'id' => true,
		'marginheight' => true,
		'marginwidth' => true,
		'name' => true,
		'scrolling' => true,
		'src' => true,
		'style' => true,
		'width' => true,
		'allowFullScreen' => true,
		'class' => true,
		'frameborder' => true,
		'height' => true,
		'mozallowfullscreen' => true,
		'src' => true,
		'title' => true,
		'webkitAllowFullScreen' => true,
		'width' => true
	);

	return $allowedposttags;
}

add_filter( 'wp_kses_allowed_html', allow_iframes, 1 );

?>

If you want <script> tags available, you’d do the same thing for $allowedposttags['script'] within that same filter.

I won’t be uploading this to the official WP plugin directory because, per the developer expectations, all code “should be made as secure as possible.” I understand this can be interpreted in different ways, but we’re literally removing a security feature WordPress chose to implement, so…

You can clone this from github into your plugins folder, or download the .zip.

Jul 17, 2020

I receive frequent emails about my platinum cure silicone posts (part 1, part 2). People all around the world want clarification of my process, so I’m happy to provide it. I’ve been casting platinum cure silicone in SLA printed masters for over a year now for my keycap business, Cherry Festival, and have successfully done […]

Continue reading...
Jun 12, 2020

My cat Lenora is constantly blocking my screen. I swear it’s a game to her. She’s exceptionally skilled at moving in front of whichever monitor I’m trying to look at, even if I move windows to different monitors. To get around this I use a couple of very simple bash scripts I’ve linked to keyboard […]

Continue reading...
Fork me on GitHub