Skip to content

Instantly share code, notes, and snippets.

View NigelEarle's full-sized avatar

Nigel Earle NigelEarle

  • NWRE Development
  • San Diego, CA
View GitHub Profile
@NigelEarle
NigelEarle / regex.md
Last active August 6, 2023 11:27
A Guide To Regex in JS

What is a Regular Expression?

A regular expression is a sequence of characters that forms a search pattern. The search pattern can be used for text search and text replace operations.

When you search for data in a text, you can use this search pattern to describe what you are searching for. A regular expression can be a single character, or a more complicated pattern. Regular expressions can be used to perform all types of text search and text replace operations.

String Modifiers

@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active March 23, 2024 09:04
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@NigelEarle
NigelEarle / Knex-Setup.md
Last active March 28, 2024 09:11
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init