Pete LePage

Thoughts on web development, life, and photography.

GitHub SSH and 2-factor auth

I hate that using SSH & 2-factor auth means I have to auth even for for a git pull. But there’s an easier way! Change the remote used for fetch to the HTTPS url. First, verify that both push/fetch are using SSH by running git remote -v it should output something like: origin git@github.com:petele/squoosh.git (fetch)origin git@github.com:petele/squoosh.git (push) Then use git remote set-url origin to set the remote URL for fetch to the HTTPS url. Your repo will now push via SSH and pull via...

Books I'm reading

Reading is critical to my mental health. Ever since I was a kid, I read, at least a little bit before I fall asleep. In fact, it’s almost a trained behavior now. If I start reading during the day, I get sleepy! What I like about reading is that it gives me an opportunity to stop thinking about the day, put all of that aside and focus on something else. Almost like “parking” my brain for the evening. I want a good book, not a great book. It needs to be something I enjoy, but easy enough to put down. If...

Is my PWA installed?

Update: This post is out of date. See Detect how the PWA was launched on web.dev for details on how to check if your PWA is installed, how it was launched and if the user switches between standalone and a browser tab view. I got a question via email this morning asking if there was a way for a PWA to check if it’s installed. The site wanted to know what state the app was running in, either a browser tab, or a standalone window. First, you can use the getInstalledRelatedApps() API to check if your...

Google I/O Device Lab

One of my highlights from Google I/O this year was the Device Lab that Matt Gaunt and I built to show developers how their site looks across the multi-device web. It was a really cool thing to see all kinds of different sites working on phones, phablets, tablets, computers and even TVs. A few folks have asked how we set things up, and how we did it, so I figured I’d document our process here! Device selection # We ended up with 46 different devices on the wall, including: Nexus 4 (x2) Nexus 5 (x10)...