So I just had this disconcerting moment of weirdness: ❯ rvm use 3.1.0 Using /Users/sjohnson/.rvm/gems/ruby-3.1.0 coding/rails/cartazzi via v18.2.0 via 💎 v3.1.0 on ☁️ (us-west-2) ❯ ruby -v ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin19] coding/rails/cartazzi via v18.2.0 via 💎 v3.1...
A few weeks ago, the maintainer of a project on SourceHut stepped down from their work, citing harassment over using SourceHut as their platform of choice. It was a difficult day when I heard about that.Over the past few weeks, I have been enduring a bit of a depressive episode. It’s a complex issue...
A few weeks ago, the maintainer of a project on SourceHut stepped down from their work, citing harassment over using SourceHut as their platform of choice. It was a difficult day when I heard about that. Over the past few weeks, I have been enduring a bit of a depressive episode. It’s a complex issu...
I've gotten quite a bit of feedback on my Bad Client story and the underlying theme has been "why the heck did you hang in so long?". There were a couple of reasons: I'm stubborn af. That was definitely a part of it. Learning Matters. Point 2, learning is what I want to focus on here. What I have al...
Here's how to use the aws cli to get a value for a secret out of secrets manager.Using the aws cli can be so much more convenient than clicking through AWS web UIs to find what you want. An example of this is in the retrieval of secret values.List All SecretsIf you need to see what secrets are in se...
How to add a cookie to a curl request.First, find your cookie. Perhaps you're making a test request to an API that your web app uses. You could fire up the web app, authenticate, open devtools and see the cookie in the request headers. Copy it. Keep it secret. Keep it safe.Then back to the terminal ...
This is what it takes to pass params to pytest fixtures.Just Use FunctionsInstead of using pytest fixtures, the easier method would be to just create a function that sets up and tears down what you need. Like this:def test_something(): my_fixture = setup_something('special sauce') # assertion... tea...
To run an async test in pytest, it must be marked. It can be a pain to mark them all individually. Here's how to mark them all async at once.Asynchronous testsYou'd need an asynchronous test for asynchronous code under test. For instance, Quart is an app server where all the endpoints are asynchrono...
Here's how to read the logs for a kubernetes (k8s) pod.Orient your readFirst, we want to orient to where we're reading from. We'll need to know context and application name. A k8s "context" is a set of access parameters, including k8s cluster, user and namespace. The "application name" is a common l...
pytest(https://pytest.orig) makes it easy to assert that an exception is raised and that it's the one you expect.PrerequisitesOnce we setup pytest, we get a nice assertion utility to verify that exceptions are raised.For instance, in module my_module.py with code:def my_fn(): raise Exception('Kaboom...
I recently pulled myself out of Magento retirement to give Commerce Bug a few minor adjustments that should make it Magento 2.4.4 and PHP 8.1 compatible. If you’re still seeing problems get in touch and we’ll get you sorted out. The extension ran into a few issues with PHP 8.1’s new levels of strict...
It is now 2022 and Job Hound has existed for 4 years now having happily served over 1,000 users to help apply for over 5,000 different jobs. Job Hound has been one of those bits of code that you write and it just runs happily in the background just plain working without fail. Other than a few restar...