James Waples' Internet Hole


Cloning private Github repos in Rust

Cloning a private Github repo using SSH auth in Rust has proved to be a pretty gnarly problem (for my anyway), so I thought I’d share this quick tutorial to help anyone else out that might be struggling with the same issue. I’m using git2-rs which has good interface documentation, but very few pieces of example code, so I set out to fix that somewhat with this post.

Continue Reading

Logging analytics events in a testable way with React and Redux

One of my main responsibilites at TotallyMoney was to take care of the in-house analytics/event logging framework. Like lots of companies, understanding what users do and how they interact with a product is to get good insight on. In this regard, people reinvent the logging wheel with various krimskrams attached, me being no exception. What I want to show in this post is how to integrate an event logging framework into a React/Redux application in a way that’s scaleable and testable. Unit testable logging is important when the rest of the business relies heavily on the events and the data in them like many companies do.

Continue Reading

Scraping without a scraper

In between watching the rain and emptying all the shmoo out of my air compressor (long overdue), I decided to try my hand at some impromptu scraping this weekend. Matters were complicated somewhat due to me not owning a scraping tool, but I worked with what I have to make what I think are some satisfctory results. This post will be a short log of what went down and will hopefully demonstrate that one can achieve reasonably good (i.e. flat) results without having a real scraper.

Continue Reading

Parsing Logentries output safely using Rust

I’m fascinated by Rust for it’s safety and speed, but also because it’s simple to write low level code in what feels like a high level language. To that end, I’ve been working on a small Rust project at TotallyMoney.com (where I work) for the last week or so to see if it’s viable for production use. It’s a simple service that polls a Logentries endpoint for JSON, parses it and saves some values in a Postgres database. It’s not a very complicated task, but I saw this as a good opportunity to try Rust in a production-ish role.

Continue Reading

Spindle speed control using LinuxCNC 2.7 with a Huanyang inverter

Huanyang branded VFD drives are ubiquitous on eBay and other sites like AliExpress. I bought one some time ago with a 1.5KW spindle and have been controlling the speed manually with the difficult to use control panel on the front. It is, however, possible to control the VFD from within LinuxCNC using the M3 and M5 commands (I haven’t been able to get M4, reverse rotation, working yet). What’s also neat is we can get the machine to wait for the spindle to come up to speed before moving to the next line of GCode.

Continue Reading