When a naive engineer (me a month ago) sees pty.spawn() for the first time, they might think “ok so it starts a new process in a new PTY. Easy.” The implementation, however, is far from simple. This post will go over how it works under the hood. What is PTY? Pseudo-terminal (PTY) is a virtualization of the legacy teletype (TTY) hardware. It consists of a pair of character devices: leader & follower (or master & slave). The pair acts as a bidirectional channel. All writes to the device fil...| yatsushi
I migrated this site from Jekyll to Hugo over the course of a week during my between-jobs break! There were a couple of issues with the previous version: It forked a Jekyll bootstrapper (jekyll-now) which felt like an unnecessary layer of abstraction. The theme I picked back in 2016 felt cluttered, and I wanted to make it simple & text focused. Comments were hosted on Disqus which I don’t use elsewhere. This post goes over my experience with the migration as well as what I wish I had known ...| yatsushi
There are many schools of thought on which medium to record your journals in (e.g., physical journal, audio recordings, etc). I like using text files for a couple of reasons: Search: it’s nice to be able to look for certain events. Storage: every journal entry is stored on Dropbox. Analysis: lets me answer questions like “How many journal entries did I write this year?” The biggest draw for me is the writing experience. As I’m already fairly experienced with vim text manipulation, I c...| yatsushi
When I read books these days, I prefer e-books mainly due to the dictionary feature. In order to expose myself more to unfamiliar words, I sought ways to: Export words from Kindle’s vocab builder feature Create a vim keybinding to import a random word from the list for my journals Note: I use a Kindle Paperwhite. Other firmware might have a different configuration. Exporting from vocab.db What I didn’t know was that all the words you’ve ever looked up in Kindle are stored in a SQLite da...| yatsushi
I’ve been struggling with enunciation for quite some time (due to moving between the U.S. and Japan during my language development years), and figured I could work on it during the quarantine. While it was easy to find a list of tongue twisters for English, one of the few Japanese websites I could find was this. Although I’m fluent in Japanese, there are certain kanji I struggle with. The website above had loads of ones I can’t read, so this article is for both myself and others who are...| yatsushi
I’ve used Zoho Mail for quite some time but was never happy with their UI. With some googling, I found that Mailgun makes it pretty easy for me to set up a custom email that I can manage on Gmail with my own domain from Namecheap for free! In this tutorial, we’ll go over how I created my own personal email (atsushi@yatsushi.com) using the Namecheap domain I purchased (yatsushi.com). We will create a new receiving and sending route specifically for our new email, which will then be forward...| yatsushi
You’re taking a CS course at UBC and have just finished a chunk of work that you want to commit. When you try to git push or git pull, you’re asked to type in your CS department’s username and password: This guide will show you how to use git config to cache your authentication info. Saving credentials Git has this nice feature called credentials that lets you store authentication credentials for git servers (like stash.ugrad.cs.ubc.ca for UBC).| yatsushi
In COMM335 at UBC, students were required to use the faculty-managed Windows VM’s Microsoft Access (DBMS GUI tool). Unfortunately, they didn’t have a setup guide for Linux as of 2019, and I had some trouble allowing the remote Windows VM to access local directories on my Ubuntu 16.04. (Picture taken from the faculty’s guide for Mac) This short guide walks through how to set it up in case future students run into the same issue.| yatsushi
The other day I ran into this timezone issue in Ruby, and that’s when I discovered the tz database for the first time. There were almost no blog posts explaining how it works, so I decided to write one myself. We’ll be using the alpine:3.12 Docker image to test things out. What is it? The tz database is a standardized collection of timezone data and rules used by most systems worldwide to handle timezone conversions.| yatsushi