Posts
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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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:
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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 #…
Read more →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…
Read more →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…
Read more →Understanding RxJS
RxJS has these 4 parts: callback creating new callbacks from original callback caller startup I like to think of it like this:
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →Wrap an API with a Proxy
codesandbox proxy api example
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →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…
Read more →