Lev's Hacking Notes

Integrating Openring into This Blog

2021-03-25 Tags: python blogging

I just did the jenkiest thing ever.

Openring is a cool little library written by Drew DeVault which allows you to add articles from feeds that you follow to your own blog. It's kind of like a dynamic blog roll.

It was designed for static site generators, but since (for some reason) this blog is not statically generated, I was thinking of the best way to include it and came up with something that is either a horrible RCE waiting to happen, or a clever hack.

I set up a cron job to run openring every eight hours and pop the output to a file. Then in flask, I made a simple utility function to go find and read this file and insert it into a Jinja variable which is then rendered on every post page (look down at the bottom).

This allows readers to check out other interesting content and also has the added benefit of being fresh several times per day.

Articles from blogs I follow around the net

Reading Environment (ENV) Variables From The Server Scope In Lucee CFML 5.3.7.47

Ben Nadel demonstrates that environment (ENV) variables can be read directly out of the SERVER scope in Lucee CFML 5.3.7.47 - shout-out to Julian Halliwell for the pro-top!...

via Ben Nadel's Web Development and User Experience Feed @ BenNadel.com October 26, 2021

GitHub stale bot considered harmful

Disclaimer: I work for a GitHub competitor. One of GitHub’s “recommended” marketplace features is the “stale” bot. The purpose of this bot is to automatically close GitHub issues after a period of inactivity, 60 days by default. You have probably encountered…

via Drew DeVault's blog October 26, 2021

Willingness to look stupid

People frequently1 think that I'm very stupid. I don't find this surprising, since I don't mind if other people think I'm stupid, which means that I don't adjust my behavior to avoid seeming stupid, which results in people thinking tha…

via Dan Luu October 21, 2021

Generated by openring