• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Will Angley

Just another WordPress site

  • About
  • Photos
  • Words
  • Resume
  • Contact

🗽Statue of Liberty

November 26, 2021 by Will Angley

🗽 Statue of Liberty from afar

Taken at Google NYC just after sunset on November 17th. As always, tap or click for a really really big version of the image.

Filed Under: Photos

Sunsets are back!

November 13, 2021 by Will Angley

And I’m so glad they are. Tap or click for a really really big version of the image 🙂

Taken at Google NYC on Wednesday, and then edited in Capture One on Saturday.

Filed Under: Photos

Marking myself out of a corner

September 27, 2021 by Will Angley

I should have my old posts up soon-ish. I figured out how to make WordPress compatible with hard wrapped Markdown.

In the olden days you’d use wpautop-control, but that particular plugin stopped working a while ago.

In the new days… you’d use Advanced Custom Fields. It’s overkill for this, but it’s likely enough to come up that you might as well 😛

First try: on-off switch

It took about two hours total once I thought to try this. The first hour was an on-off switch, implemented as a True/False field:

I exported this to PHP, wired a small filter to it, tried it on a short poem:

To add paragraphs
or not to add paragraphs,
that is the question.

checked it in when it looked like it worked, and deployed it.

Second try: button group

After I deployed it, I tried it on a longer text and noticed all of my paragraph breaks had gone missing. This felt all too familiar.

I remembered that I actually wanted a tri-state switch, since hard-wrapped Markdown wants automatic paragraph insertion but not automatic line break insertion. I made a button group field… and nothing happened. It didn’t appear on my site.

After twenty minutes of Googling, I remembered that ACF’s PHP export adds field groups rather than individual fields. I commented out the field group in my core functionality plugin and the field immediately appeared:

A few minutes later I wired the tri-state together, tested it on a longer poem:

To add breaks
or not to add breaks,
that is the question.

To add paragraphs
or not to add paragraphs,
that is the question.

and my problem was solved.

Filed Under: Words Tagged With: wordpress

Incident of the day: Bonobos

January 22, 2021 by Will Angley

✉️ Important update about your Bonobos account security

From: ninjas@bonobos.com

Dear William, 

We believe an unauthorized third party may have been able to view some of your account details, including your contact information and encrypted password. Your encrypted password was protected so your actual password was not visible. Payment card information was not affected by this issue.

To protect the security of your account, we are resetting your password and have logged you out of your account. To log back in, you just need to set a new, unique password through the link below:

…

Walmart acquired Bonobos three plus years ago, and runs it as a separate business. I’m generally glad they did this; Bonobos is as much about its software as its clothing, and I like their storefront much better than Walmart’s.

But it sounds like they could use a Security Ninja.

Filed Under: Words Tagged With: (In)security

Why does installing Wi-Fi still involve knocking holes in walls?

January 15, 2021 by Will Angley

Wi-Fi doesn’t need holes in walls. But most Wi-Fi routers are still connected to the Internet through a wired connection to an ISP. This connection does.

Connecting to your ISP

The cable that your ISP uses to reach your home is a lot longer than cables inside your home. Even when it’s the same sort of cable, it uses different protocols that work better over long distances.

Installing Wi-Fi requires installing hardware that translates these protocols to home networking protocols: an optical network terminal (ONT) for fiber-optic networks, or a cable modem for cable Internet.

This hardware is usually installed close to where the cable to the ISP reaches your home, near an outside wall. This makes it easier for the ISP to fix when it breaks.

Connecting to your Wi-Fi router

But an exterior wall is a bad place for a Wi-Fi router. A computer on the other side of your home will be twice as far away as it would be if the Wi-Fi router was in the center of your home.

Wi-Fi is made of radio waves, so the inverse square law applies. Getting twice as far away means you have one fourth the signal strength.

Wi-Fi tries to make up for this by spending longer talking to far away devices, which leaves it less time to talk to every other device on your network. This is a common way to run into Wi-Fi performance problems, even when you think your Wi-Fi router should be good enough.

Putting the Wi-Fi router near the center of your home, and running an Ethernet cable between it and your ISP hardware, resolves this. It’s often the most impactful Wi-Fi upgrade you can make.

And you might save some money if you stop renting your ISP’s router, too.

Filed Under: Words

Marking myself into a corner, part 2: wpautop

January 6, 2021 by Will Angley

Previously: Marking myself into a corner, part 1

I found unexpected paragraph breaks in a post I’d written in Markdown, and copy-pasted into WordPress, about a day after I published it.

Clicking Edit showed I had line breaks in the Markdown source where there were paragraph breaks in the published post. I recognized this as WordPress’s wpautop filter, which uses different rules to place paragraph breaks than Markdown. A quick search shows this was reported upstream and closed as infeasible: jetpack#1965

I worked around it by deleting the line breaks.

Can I fix this with a plugin?

I tried dealing with this by using a plugin, Toggle wpautop, but found that wasn’t the right thing either; Jetpack Markdown relies on having wpautop active.

This is the second time I’ve encountered this; the first time was in 2019, when I was looking at moving from Hugo to WordPress. I felt overwhelmed and gave up on the project then.

This time, I looked back at the Jetpack issue, and saw there’s a workaround: calling wpautop( $content, false ); will do the right thing for Markdown posts. I haven’t found a plugin that implements this, but I might be able to patch it in to the one I’ve found…

Filed Under: Words

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 6
  • Go to Next Page »

Primary Sidebar

About the Author

Will Angley likes to take photos, and pays the bills by writing code for a big company.

By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.

Follow me

  • GitHub
  • Instagram
  • LinkedIn
  • RSS
  • Twitter

Top Posts

  • How I set up Tailscale on my WiFi router

Recent Posts

  • 🗽Statue of Liberty
  • Sunsets are back!
  • Marking myself out of a corner
  • Incident of the day: Bonobos
  • Why does installing Wi-Fi still involve knocking holes in walls?

Categories

  • Photos
  • Words

Copyright © 2014–2023 Will Angley · Privacy Policy · Made with ❤️ and WordPress in NYC