Here’s a handy zsh alias to make a new directory and cd into with a single command from the command line.

There are two ways to do this from within your .zshrc:

With a function (recommended)

The suggested way to do this is with a named function added to your .zshrc file. It goes like this:

function vk() { md $1 && cd $_ }

This function says: make a new directory with a name defined from the user input, then cd into the directory with the name of the last parameter of the previous command (that’s what $_ does).

With an alias

Zsh does not accept…

Getting ignored never felt so good

I keep a lot of snippets on my work computer but the one I come back to the most is my regex cheat sheet. I find it so helpful that I’m posting it here for others to enjoy as well.

(Pasting in monotype to preserve markdown formatting)


By @geochronology -


## test()

Checks if regex matches var

Syntax: regex.text(var)


## match()

Returns array of pattern matches
* Without /g, only returns first match
* With /g, returns all matches

Syntax: var.match(regex)


## replace()

Swaps occurences of a regex with something else

* With plain text: wrongText.replace(silverRegex, "blue");
// returns…

Here’s how to create a code snippet that outputs export default followed by the base name of the file.

For example, if I’m in the file cheeseCounter.js and I use the snippet, the output is export default cheeseCounter.

  1. Open code snippets. On a mac type cmd-shift-p and then enter “snippets”. Choose “Preferences: Configure User Snippets”
  2. If you haven’t used snippets before, create a new snippets file. Otherwise, just use whichever file you’re comfortable working with.
  3. Add this snippet (note: the snippet name and prefix are both up to you. …

MirageJS is an amazing new backend mocking utility that ‘s taking the React world by storm.

My use case for learning Mirage was to mock the endpoint for a new feature I’m building at work. As a result I had the following three conditions:

  1. I do want a Mirage server to intercept calls to my new endpoint
  2. I don’t want to mock our Auth0 authentication routes
  3. I simply want the rest of my app to behave

This article will show you how MirageJS lets you mock an endpoint that requires real authentication, for instance, in simulating a feature that sits…

By default, Semantic-UI-React installs a vanilla build of Semantic-UI, without a themes folder or any of the default themes (Material, Bootstrap, etc.) that come included in semantic-ui’s non-react-flavored version.

You’d think it would be easy to add the themes, say with an installation script similar tonpx @semantic-ui-react/bootstrap, the built-in setup module referred to on the Theming page of Semantic-UI-React.

Alas, no such magical theme-adding script yet exists. The good news is there’s a simple workaround that works like a charm.

Step 1: Create a new react app

Go to some other directory from your project and create a new react app. I named mine sem-ui-themes-pls.

Step 2: Install Fomantic-UI in the new app

Run npx…

Chris Perry

Software Engineer at Narvar, Inc.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store