Authorize Net in 2024

I’ve integrated a few payment gateways over the years including Authorize.net, WePay, Spreedly, and Stripe but recently had the opportunity to integrate Authorize.net into our system. It’s actually not the first time I’ve integrated Authorize.net as I did a server-side implementation years ago when server-side implementations were still cool. I mention this to show I’ve seen a couple of ways this can be implemented. Maybe I’m missing something but the new Accept....

September 23, 2024 · 5 min · Rob Henley
Image of terminal with bash function

Static Site Generator Image Workflow

I have yet to find the “perfect” workflow for images for any platform but stumbled on one that could work at least for posts that tend to contain a lot of screenshots. The thought occurred to me that I could just take the latest screenshot move it to the current directory and rename it to its md5 sum. So I added the following function to my ~/.bashrc. # MOVE MOST RECENT SCREENSHOT # Moves the most recent screenshot from the Screenshots directory into the current directory # # An example output would be: # Screenshot 2024-05-25 at 9....

May 25, 2024 · 2 min · Rob Henley
Image of Borg error

Borg Command Not Found

When setting up Borg if you get the following error Remote: bash: line 1: borg: command not found Connection closed by remote host. Is borg working on the server? This was because only the .bashrc is executed for non-interactive sessions and inside the .bashrc of at least Ubuntu (24.04) is the following at the very top of the file. This meant that in my case I needed to put the path related environment variables above the following lines so SSH could find the borg command....

May 24, 2024 · 1 min · Rob Henley

S3 ListObjectsV2 ListObjects Access Denied Issue

I’m trying to recursively download a S3 folder from an EC2 instance. I have role with a policy that includes: s3:ListBucket among other things attached to the EC2 instance and can download individual files but keep getting the following error when trying to do so recursively: “An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied” The command being used that was erroring: aws s3 cp s3://<bucket>/<path>/ ~/temp --recursive --debug...

February 4, 2023 · 1 min · Rob Henley

How To Test CORS

This is mostly a note to myself because for some reason when testing CORS headers I nearly always manage to forget to include the Origin header. For completeness here’s an example using curl: curl -v --request OPTIONS 'localhost:8080' --header 'Origin: http://example.com' Here’s an example of doing an OPTIONS request to test authorization against AWS S3: curl --head --request OPTIONS \ --header 'origin: https://www.example.com' \ --header 'Access-Control-Request-Method: GET' \ https://s3.amazonaws.com/example/path/to/object/my-image.jpg NOTE: Probably more to the story but CORS seems very expensive!...

September 12, 2022 · 1 min · Rob Henley