RSSAmplifier

Blog

johnlindquist.com

This is where I post things!

johnlindquist.comRSS feed ↗47 posts

Latest posts

Combine Layers and Simlayers in Karabiner

Got a quick Karabiner question on twitter over the weekend: Assuming a layer and simlayer like these: I would approach combining them like so: :condi allows you to define multiple conditions that need to be met for the…

Use AppleScript in a Shell Script

Use AppleScript in a Shell Script You can write AppleScript as Shell Scripts just as you would with any other bash/zsh file. The key requirement is that you start the file with the appropriate shebang line: Then make…

What Should I Teach in a Video Tutorial?

Start at the End Your goal : transfer your skill to the viewer . So pick the skill you want the viewer to take away from the video: Write a Dynamic Route in Next.js Connect a Bluetooth Controller to a Lego Boost Kit…

Automatically Switch Node Versions Based on Your Package.json and Precmd in ZSH

I enjoy using the very latest version of node.js for my quick scripts I write on my computer. That means that my nvm is set to run Node v14. Every time I've fired up our egghead-next project recently, I've had to…

Map Alfred Snippets to a Specific Application

"It would be very useful if we can use snippet groups only when some specific applications are activated" "Is there a way that you could use a workflow to monitor when the specified application is being used and then…

Take Control of Your Keyboard Shortcuts with Karabiner Elements

"I have been trying for awhile now to remap the Ctrl+Tab" "I wish keyboard shortcuts in every IDE were standardized." "I just need to get off my ass and learn Karabiner" I've seen a lot of frustration in Discord Chats…

An Opinionated Guide to Keyboard Thumb Keys

I've used a lot of keyboards over the years. All of my favorite keyboards include thumb clusters: keyboardio kinesis advantage 2 ultimate hacking keyboard ergodox I'm constantly tweaking my keyboard layouts using their…

Teeth Before and After Invisalign

I think the top-right "smile" picture tells the biggest story: Sep 3, 2016 July 11, 2019

Use Vercel's Pkg to Bundle Node.js and Your Code Into a Shareable Executable

I've been building Alfred workflows quite a bit recently and have started leveraging the Script Filter while leveraging node packages and scripts. This works great for my own workflow where I know that I have node…

AceJump and Expand Selection in VSCode

AceJump is my favorite tool that I've ever made. I'm pretty sure the idea existed before I made it, but I wasn't aware of those solutions and all of the ideas came from my own brain. I've been super happy to see all the…

Generate Markdown Links From Your Selected Text and Chrome's Current Url Using Alfred

I've been spending a lot of time trying to optimize the workflow around adding more posts to my digital garden and a couple of the biggest holdups were around adding links to pages I was looking at in Chrome. I figured…

Parsing Arguments With Zparseopts in Zsh Functions

I've always been a little scared of zsh. Probably because JavaScript and writing cli tools in node.js has always been easier and more comfortable for me. I ran into a situation where I needed to pass arguments into…

RxJS in Svelte

I'm really starting to ❤️ svelte . I've always loved using Observables from RxJS . The fact that I can easily combine them really excites me. I think that Svelte is one of the easiest ways to get an app up and running…

Quick Demo of My Music Visualizer Background in OBS

I've been playing around with Music Visualizers in JavaScript. I figured it would be possible to pump music into the background of my OBS to add a bit of flavor to my livestream. The result is below and I'm quite happy…

Send Midi Notes to Ableton Live Using Javascript and Easymidi

easymidi is a package on npm that allows you to watch real midi inputs and outputs as well as create your own midi virtual inputs and outputs. This means that you can use JavaScript to create a virtual midi instrument…

Create a Beat With Your Voice and Wavetable in Ableton Live

Wavetable can be used for a whole lot more than simply selecting a wavetable preset. You can drag any sample onto the wavetable and use it to generate music. This includes recording your own voice. Once you get your…

Control a Synth With Your Voice and a Gate in Ableton Live

Sometimes you have a rythym in your head that you're having a hard time laying down using a keyboard or pads. Whenever that happens, just record an audio track using your voice or clapping then sidechain the audio track…

Build Siri Shortcut Automations for NFC Chips

My NFC chips arrived in the mail today. I bought these ones from Amazon (I don't know if there's a "best" chip): I figured I use the afternoon to figure out how to hook them into Siri Shortcuts to see if I could make…

Copy and Paste From Mac to Windows With Synergy

I've been streaming more and more using a Mac for development and making music while using the PC for handling all the streaming. I was getting tired of switching back and forth between 2 mice and 2 keyboards, so I went…

Strip Characters From a String Using Bash

Today I ran into the scenario where I want to use bash/zsh to remove the file extension from a string. I wanted to read in the filename, then create a directory based on the filename. If you copy/paste the following into…

Unruly Umbrella

I generated a random project name called "Unruly Umbrella". This gave me a YouTube video result of the following video: The Result I sliced up samples of that and came up with this song: Add a Rhythm to a Sample with a…

Building a Privacy VS Code Extension

Goal The goal of this stream was to build a VS Code extension that could hide all of the values displayed in a .env file. The Outcome We got so close to getting everything working, but when using the event system in…

Customize Karabiner With Goku

I love keyboards and I super love keyboard shortcuts. The #1 reason that I use a Mac is due to a single piece of software: Karabiner . I've been using Karabiner for many years now and it's something that you set once…

Rolling Your Own Creation Operators in RxJS

The Value of Writing Your Own Operators When you import {Observable} from "rxjs" , you open up a world of possibility. Granted, RxJS ships a lot of operators that handle a lot of edge cases, but we've seen many…

Simplifying mergeMap in RxJS

What Does mergeMap Do? Let's take the example of "click to start a timeout". In vanilla JavaScript, you would write it like this: If you understand that, you can understand mergeMap . mergeMap starts with source #…

Why are RxJS Operators and Pipe So Confusing?

What Does Pipe Do Anyway? Let's take a quick look at the most common RxJS example. This code will log out MouseEvents from clicking on the documuent: So what happens when we add a pipe into the mix: As it turns out…

Subject in RxJS vs. Subject in the Observer Pattern

The Observer Pattern had Subjects... 🤔 True, true, we've seen subjects already . But, in RxJS-land, Subjects are a combination of Observables and Observers! 🤯 So that means we need to combine our previous concept of a…

Is an Observable Part of the Observer Pattern?

TL;DR No. Goodbye State 👋 In our previous post we defined observers as objects that take a subject and can pull the state in. With Observables , the concept of "state" is gone. We're now thinking in events (AKA…

What Is the Observer Pattern in JavaScript?

The Observer Pattern has state and objects that are notified when state changes so they can query the state. Check the State from the Observer First, the state is held inside of an object that we'll call a subject…

RxJS Ajax and Loading State

Merge and WithLatestFrom in Vanilla JS

Are You Still There

Explaining Streams to Rich Harris

Before we begin, I'm intentionally avoiding loaded words found in stream libraries. If you're familiar with another library already, try and spot where the concepts align. Hi Rich! 👋 1. Start with an addEventListener…

Git Commit and Push From VS Code With a Single Keyboard Shortcut

First, install the runInTerminal extension. Then, add the following to your keyboard shortcuts: && will wait for the previous command to finish before executing git add . will add all files to be commited git commit…

Use Greensock With React Hooks

I publish a use-gsap package on npm today. Here's the basic usage:

Replacing Named Parameters With Function Composition

A quick little https://egghead.io lesson if you're in to that sorta thing: Named parameters are a great feature of JavaScript, don't get me wrong, but sometimes functional composition is a more elegant solutions (I…

Understanding RxJS

RxJS has these 4 parts: callback creating new callbacks from original callback caller startup I like to think of it like this:

Alfred Workflow for Vanilla Codesandbox

I open a Codesandbox so often, I wanted to set up a quick Alfred keyword to launch it. It's super easy to configure in Alfred, but if you want to download it I've included it below:

Create Command Line Tools With Node.js

There are so many every day tasks that we all come across that we need to automate away. My most recent example is that I wanted to blog more. So what do I do first? I write code of course: Repo I setup this hard-coded…

Automatically Create a Github Repo From the Command-Line

If you don't have hub installed, you should: Github's hub tool I use the git alias (instead of the default hub ) and I end up using git create almost every day. Easily Create Codesanboxes from Your New Repo It…

What Even is Programming?

I don't know anymore. I thought that programming was writing some code and handing it over to a computer to execute. Now it seems like we weave together services and sites automatically appear through some magical…

Wrap an API with a Proxy

codesandbox proxy api example

Build a Lens From Scratch

Let's take a backwards approach to dive into lenses by starting with our final implementation. What you see below is what we want our api to look like. We want prop to be a lens which can focus on a property and we…

Focused - Putting Proxies to Work

Focused With the power of our new proxy knowledge in hand, let’s turn to a library that leverages proxies behind the scenes. Focused is a library that uses similar techniques to get properties using proxies which…

Safely Get Nested Values with Proxies

We've all been in the situation where we are trying to access a very deeply nested property inside of an object but it errors out because one of those properties you're trying to access is undefined. Strings to the…

Use Reflect APIs with Proxy Handlers

You'll notice something strange when you compare the Reflect API and the handler API for Proxies: Reflect API handler API Reflect.apply() handler.apply() Reflect.construct() handler.construct() Reflect.defineProperty…

Your First JavaScript Proxy

A Proxy is a fancy word for intercepting how you interact with objects in JavaScript. Want to hi-jack what happens when you set a value? Care to log out every time you call a function? All this and much more can be…