Skip to content

Automating Elixir Package Deployment with GitHub Actions

I enjoy Elixir, although I know it doesn’t make sense to use it for most production applications. However, I try to use it for side projects when I can, even just because it’s such a fun and beautiful language to program in. One thing I’ve been fascinated with recently is automating the entire release process for packages using conventional commits with GitHub actions. This post walks through how to make that happen, and some other bits around Elixir project setup. Here’s the example project with all of the learnings from this post in place…

Continue Reading

Aggregating Data by Month in Google Sheets

Certain operations that are easy in SQL are hard in google sheets / excel. I ran into one of these: I had a simple problem: I had some time series data (dividend payouts from a financial institution) and I wanted to aggregate the data by month. In SQL, this is a simple GROUP BY, in sheets it’s not that easy. Create a separate sheet to aggregate data, then group Filter based on the type of transaction Look at each date and normalize it to the last day of the month =ARRAYFORMULA(EOMONTH(B:B, 0)) (this is now column E) Get a list of unique months (i.e…

Continue Reading

Re-learning Modern PHP

A while back, I ran into Monica (a sort of fancy address book). I started to use and self-host the project as part of tinkering with my raspberry pi and then wanted to make a couple of improvements to the project. This was a good excuse to explore the PHP world and see how things have evolved since I touched the language over a decade ago. I’m surprised to say this, but working with PHP was not nearly as painful as I thought it would be. The language and tooling have evolved nicely over the years. If I was forced to use PHP as my daily driver, I wouldn’t be too disappointed!..

Continue Reading

Download a CSV of Wealthfront Financial Activity

I use Wealthfront for a portion of my investments. I recently was trying to get a CSV of all my dividends, fees, etc this year and there’s not a way to do this! If you navigate to your activity (homepage > investment account > see recent activity) you can at least generate a CSV from the information on-screen (which does not include your gains/losses from the direct indexing) and copy/paste this into your web console, your browser will spit out a CSV. This is highly tied to the current (as of this writing) Wealthfront HTML structure, so you’ll probably have to ask ChatGPT to fix this in some number of months…

Continue Reading

Notes on Locked Records in NetSuite

In NetSuite, records can be "locked". This is a special state that is poorly documented and introduces some very strange behavior. Hopefully, some of these notes save someone banging their head against the wall to solve this problem! Records can be locked in NetSuite in one of two ways: (1) the accounting period the transaction is in can be locked (2) or the record can be explicitly locked. You cannot determine if the accounting period is locked directly from the record. You’ll need to pull the associated AccountingPeriod posting_period object reference. You cannot "explicitly" lock a transaction in NetSuite via the API. I have not found a way to do this through the GUI either. A workflow can lock a record in NetSuite…

Continue Reading

Executing Multiple SQL Statements in Elixir

Working with raw SQL in the Elixir/Ecto world is not easy. I thought executing a multi-line SQL file in a database migration would be easy; it’s not. Here’s what I learned: The execute function does not support executing multiple statements at once. It’s perplexing that there’s no direct solution for this in Elixir. While AyeSQL claims raw SQL support, it mandates a one-statement-at-a-time approach. This limitation is particularly problematic when importing SQL designed to create triggers spanning multiple lines. For simple SQL tasks, you might consider splitting the raw SQL into multiple lines: But only if your SQL is well-formed and relatively simple…

Continue Reading

Scraping the web with OpenAI

One of the really interesting LLM use cases is extracting structured data from unstructured data. In the old days (6mo ago), extracting structured data from web pages required custom xpath or css selectors for each website that constantly broke as the host changed their page structure. For instance, extracting the price of a house on redfin. This is why Plaid (and similar competitors) break so often: many of their integrations "screen scrape" which means they need a team of people updating xpath and css selectors on various bank sites (TreasuryDirect, for example, is broken constantly). I built a open source database of venture capital firms that used this approach to extract team member information from each firm…

Continue Reading

Git Completions & Tooling on the Command Line

I enjoy tuning my terminal environment. I’ve recently learned tmux, switched to zsh, and constantly incrementally improve my personal dotfiles. I’ve put together a stack of tools for working with git on the command line. I find this much faster than working in a GUI. Here’s what I use: git-fuzzy for generating commits (git patch is especially useful here) forgit for switching branches, viewing logs, stash list, git fixup, etc git (aliased as g) for misc git commands (like cherry-pick, etc) with a handful of config customization custom functions and aliases for various shortcuts, including interacting with the gh-cli command However, one piece of the puzzle for me wasn’t working properly: tab completions on the core git command…

Continue Reading