27th Feb 2025
| Tags:
blog coding
At the dayjob, we do payments, both credit card and bank transfers.
Over the years, I’ve done over a dozen integrations to support the banks our customers use, using a mix of HTTP and SFTP.
The latest one we had was working with a bank that used an HTTP API to submit transactions, but was extremely picky about how the request was made.
We needed to make an HTTP call with:
- a custom Authorization header format (literally Basic auth but with a different name)
- a custom (nonstandard) header
- a multipart form data field with a required content-type
- a separate multipart file upload
After massaging our request enough to get it working with Net::HTTP, I thought I’d give some other options a shot for comparison.
» Read more...
22nd Apr 2020
| Tags:
git
Recently at work we passed a major milestone on our codebase, and I wanted to see if I could run some analysis over time on authorship and see how long some early contributors’ work stuck around in the product.
A bit of experimentation and random googling left me with these three scripts.
» Read more...
20th Jun 2017
| Tags:
git
Today at work, I determined that my current work in progress branch was going to want to be merged into production ahead of our next scheduled merge/deploy of master. To make it easier to merge into our production branch for a hot-fix deploy, I want to have the branch based off production instead of master.
» Read more...
4th Jun 2015
| Tags:
ruby rails
I was needing to do some object cleanup in our rails app the other day, and purge some malformed objects, so I put together a quick script using some ActiveRecord reflection to walk the object chain.
» Read more...
6th Sep 2012
| Tags:
programming ruby
Update 2023: Just use direnv with layout ruby
.
Bundler is pretty darn good. Installing all your gems globally sucks. bundle install --path
does a great job of fixing that but it means you need to bundle exec
any shell commands you want to run, which again sucks. There are lots of attempts to fix this, but they’re all fairly convoluted.
» Read more...
15th May 2012
| Tags:
git
At work, we provide an API for our app and maintain web-based
documentation for said API. We originally had the documentation in a
separate git repo, but as it makes much more sense to maintain the docs
directly alongside the code it documents we wanted to merge the two
repositories. This was done in two steps.
» Read more...