Grailbox

Down the Raspberry Pi Rabbit Hole

I can be easily distracted. Lately, I’ve been working on a new blog of sorts, but instead of technical stuff, this blog will focus on writings about life. I think. I’m almost 10,000 words into recounting my recent motorcycle accident, and I haven’t published …

Read more →

Installing Go 1.12 on MacOS High Sierra

Go 1.12 was released three days ago (Feb 25, 2019). I upgraded my personal MacBook Pro, which runs Mojave, with: $ brew upgrade go The upgrade failed with the error: The upgrade ran fine. Then, I tried to upgrade my work MacBook Pro, which runs High Sierra and …

Read more →

Go, HTTP Headers, and Rubber Duck Debugging

A recent Jira ticket instructed me to make a call from one of my Go services to another group’s service. I’d perform a PUT to a specific URL to create a service provider in our access management solution, here known as “Cool Access Manager” or “CoolAM.” For …

Read more →

Automatically Close NerdTree When Using Vimade

As the NERDTree README points out, you can automatically close Vim if NERDTree is the only open window by adding this to your configuration: autocmd bufenter * if (winnr("$") == 1 && exists(“b:NERDTree”) && b:NERDTree.isTabTree()) | q | endif If you are using …

Read more →

Building Microservices in Go Using Go Kit

Last August, I spoke at Code on the Beach on building microservices in Go using Go kit. Here’s the video: An error occurred. Unable to execute JavaScript. The repo I used is available at https://github.com/hoop33/roster and the Node CLI is available at …

Read more →

How to Return All Fields for a GraphQL Query

A frequent GraphQL question is how to return all fields in a GraphQL query without specifying them all; see here or here or here. The conversation typically goes like this: Q: “How can I return all the fields for a GraphQL query without specifying them? Can I …

Read more →

Restricting ripgrep to certain file types

I’ve been using ripgrep to search files for awhile, but I hadn’t figured out how to recursively search only certain file types. Anytime I needed to search, say, for any occurrence of “doFoo” in Go source files, I’d type: $ rg 'doFoo' *.go *.go: No such file or …

Read more →

Ctags for GraphQL Schemas

I’ve been developing some GraphQL services lately. Since I use Neovim (and fzf) for editing, I wanted Ctags support for my schema files. Here’s what I came up with: I’d love feedback – thanks!

Read more →

Another Windows Scammer

I got another call yesterday from “Windows Tech Support” that went something like this: Him (moderate accent): “Hi, I’m calling from Windows Tech Support, and . . ." Me: “Oh, no! Do I have a virus?" Him: *chuckling* “No, you have a browser injection malware." …

Read more →

Brandon from Windows

I just got a call from “Brandon from Windows” that I wish I’d recorded. He, of course, told me (in a Bangalorean accent) that my computer had malware issues. Our conversation went something like this: “Brandon”: This is Brandon from Windows. Your computer has …

Read more →