code.dblock.org | tech blog

https://code.dblock.org/feed.xml (RSS)
visit blog
Adding a Spell Checker to a Jekyll Blog
30 Dec 2024 | original ↗

I found it annoyingly non-trivial to add a spell checker to this blog. For now, I settled on GitHub Spellcheck Action that uses PySpelling on files changed in the commit or pull request as described in this blog post. name: Check Spelling on: [push, pull_request] jobs: check: runs-on: ubuntu-latest steps: - uses:...

I Participated in 2882 Meetings in 5 Years
20 Dec 2024 | original ↗

Since my first day in AWS 5 1/2 years ago, I’ve been experimenting with keeping a CHANGELOG of everything I do, available for everyone at the company to see. I wrote about it here. If you work at AWS, use the URL in the screenshot below to find it. I wrote a little script to try and classify where I spent my time. Here are some quick, very...

Do Not Fix Bugs Reported in Your Open Source Projects
19 Dec 2024 | original ↗

Have you watched The IT Crowd? It’s a hilarious British television sitcom from around 2006 that cast a bunch of IT geniuses at the Reynholm Industries tech support department in London. One of the signature laughs is that every time the phone rang, Roy would pick it up and without waiting say “Have you turned it off and on again?”, then hang up....

Harvesting the Low Hanging Fruit in Open Source Projects
18 Dec 2024 | original ↗

Every active open-source project grows a lot of low hanging fruit. Encouraging project users to harvest some of the yield can be a great way to engage and retain new contributors. Here are some ideas, mostly borrowed from Barani, for low-hanging work items that you can propose to anyone engaging in your project. Help Wanted, Good First Issue and...

How to Grow Open-Source Contributors and Maintainers
14 Dec 2024 | original ↗

I’ve been very active in open source since around 2008 and have become very passionate about growing contributors and maintainers in the projects I am involved in. The health of an open-source project can easily be measured by the number of actively engaged participants in its code, which cannot happen without maintainers. Maintainers are leaders...

Creating an OpenSearch Cluster with Dangling Indexes
21 Nov 2024 | original ↗

I’ve previously written about the OpenSearch OpenAPI Specification and how it can be used to fix bugs in the OpenSearch documentation. Most of the tests in the API spec work with a generic Docker container and some basic network setup to expose a local 9200 port. version: '3' services: opensearch-cluster: image:...

Safely Passing Ruby Variables to JavaScript in ERB
30 Oct 2024 | original ↗

A user reported a bug in Slava, a bot that syncs Strava activities to Slack, where they couldn’t subscribe to the paid version because their Slack team name contained a quote. That was a rookie mistake on my part in HTML escaping that almost cost me $9.99. Interestingly, it required a rather non-trivial fix. The bot’s code extensively uses ERB,...

OpenSearch Project Joins the Linux Foundation
17 Sept 2024 | original ↗

Yesterday, the Linux Foundation (LF) announced the new OpenSearch Software Foundation, with Amazon transferring the 3½ year old open-source project to LF (RT). This outcome ensures the long term viability of this technology in a vendor-neutral way, under the most enterprise-friendly open-source Apache License v2. It is the result of the work of...

Enumerating DigitalOcean Apps with a Deprecated Ubuntu 18 Stack
24 Jul 2024 | original ↗

I use DigitalOcean to run a bunch of apps. It’s working out great. Yesterday, they sent me an email with a menacing “Ubuntu 18 is no longer supported and so it’s not receiving security updates.” note. To be fair, Ubuntu 18 is very old. Their email included instructions to go to settings to find out what stack you’re using. Let’s find out what...

Fixing Bugs in the OpenSearch API Documentation using API Spec Tests
12 Jul 2024 | original ↗

I’ve previously written about the OpenSearch OpenAPI Specification. One of the neat features of the API spec repo is a set of declarative YAML integration tests. This turned out to be really useful in fixing bugs in the OpenSearch API reference documentation that is published to opensearch.org. Here’s how I went about it. To author tests, I...

Using OpenSearch Cat API Response Formats
2 Jul 2024 | original ↗

I’ve been working on the new OpenSearch OpenAPI Specification that aims to properly document OpenSearch RESTful APIs. The spec is to be used to auto-generate OpenSearch clients in Python, Java, .NET, etc. One of the neat features of the API specification repo is a set of declarative YAML integration tests that ensure that the spec has the correct...

Writing a Channel Slack Bot with Granular Permissions
30 Jun 2024 | original ↗

In 2020 Slack introduced granular permissions and has begun enforcing that legacy applications use them. I’ve previously migrated a simple bot to use those in-place, but it has come time to rewrite my larger, more complex S’Up for Slack Teams and GameBot Leaderboard bots. Furthermore, the previous versions of the bots only allowed one S’Up group...

Adding eslint and Auto-Fixing an Existing TypeScript Project
23 Apr 2024 | original ↗

In opensearch-api-specification#260 I added eslint, but had a hard time finding a cookbook for auto-fixing specific violations. Here it is. First, I followed the getting started with eslint guide, which essentially tells you to run npm init @eslint/config@latest. Rewrite eslint.config.mjs using the newer flat configuration format, making sure...

Commenting on Pull Requests in GitHub Actions
19 Apr 2024 | original ↗

The OpenSearch API specification is authored in OpenAPI and used to auto-generate OpenSearch language clients. I wanted to know how much of the API was described in it vs. the actual API implemented in the default distribution of OpenSearch that includes all plugins. To do so, I have exposed an iterator over REST handlers in OpenSearch core, and...

Writing OpenSearch Plugins and Extensions (in Python)
29 Sept 2023 | original ↗

Check out this talk recorded at OpenSearchCon 2023, or continue reading. Most custom functionality in OpenSearch is implemented with plugins. That is, in theory. In practice, much of core functionality is also implemented in plugins. For example, security or k-NN search are both plugins, even though one would reasonably expect a security...

How to ingest a PDF document into OpenSearch with the ingest-attachment plugin
29 Sept 2023 | original ↗

This is a neat feature available in OpenSearch via an optional ingest-attachment plugin. It’s installed on AWS domains by default. Download OpenSearch, install the ingest-attachment plugin, and start it. wget https://artifacts.opensearch.org/releases/bundle/opensearch/2.10.0/opensearch-2.10.0-linux-x64.tar.gz tar vfxz...

Changing the default admin password in OpenSearch
8 Aug 2023 | original ↗

OpenSearch ships with a pretty comprehensive doc on getting started, along with a comprehensive reference to its vast security configuration. This can be a bit overwhelming. Here’s how one can change the default “admin” password. In my case I’ll do it inside my demo docker instance, but you can skip the Docker parts if you’re just downloading and...

Triggering CI from Pull Requests and Force Pushes in GitHub Actions
29 Apr 2023 | original ↗

The slack-ruby-client generates code from an API reference scraped from the Slack documentation website. Until now, the update process was a manual operation involving checking out the code, running a rake task, updating a CHANGELOG.md, and making a pull request, e.g. slack-ruby-client#455. Let’s automate this using GitHub Actions (GHA)! We’ll...

Backing up DigitalOcean MongoDB to Dropbox
29 Jan 2023 | original ↗

After migrating my apps to DigitalOcean apps I started looking for a MongoDB automated offsite backup solution. DO backs up all MongoDB daily automatically, but I am paranoid, and like to store an offsite copy of the data in Dropbox in monthly increments. I first tried to build a DigitalOcean app function that could run on a schedule and connect...

↑ These items are from RSS. Visit the blog itself at https://code.dblock.org/feed.xml to find everything else and to appreciate author's digital home.