Skip to content

Instantly share code, notes, and snippets.

View danibarker's full-sized avatar

Danielle Barker danibarker

  • New Idea Machine
  • Calgary, Alberta, Canada
View GitHub Profile

Using Documentation

Tips

  • Check if the package has a website
  • Search for the package on npmjs.com
  • Look for a GitHub repository
  • Check the package's README.md

Getting Started

@danibarker
danibarker / git-troubleshooting.md
Last active March 20, 2024 17:52
Git troubleshooting

Git Troubleshooting

Git is a powerful tool, but it can be a bit tricky to use. Here are some common problems, espectially while working on a team and how to solve them.

Merge Conflicts

Merge conflicts occur when two people have changed the same lines in a file. Git can't automatically determine which changes to keep, so it asks you to resolve the conflict.

There are 2 main ways you will find out about a merge conflict:

@danibarker
danibarker / EXAMPLES.md
Last active March 11, 2024 18:38
CSS Grid

CSS Grid Examples

Simple Grid Layout

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@danibarker
danibarker / README.md
Last active February 21, 2024 19:23
It's nothing

H1

H2

H3

H4

H5
H6

Paragraph

Blockquote

@danibarker
danibarker / README.md
Last active February 21, 2024 19:00
Methods Of Starting a GitHub Repository

Starting a Github Repository

1. Already have files on your local machine

  • Create a new repository on GitHub (Do not initialize with a README or add a .gitignore or license), you will then be lead to a new page, look for this and copy the HTTPS or SSH url of the repository: image

  • Open your terminal with the project folder open in VSCode (Make sure you are in the root directory of your project)

  • Initialize the local directory as a Git repository:

@danibarker
danibarker / Installing NVM (Windows).md
Created August 28, 2023 02:09
Installing NVM on WIndows

Download the installer from this link https://github.com/coreybutler/nvm-windows/releases/download/1.1.10/nvm-setup.exe Leave all the default options (unless you know what you're doing)

Using the program "Git Bash" (You should have installed this in a previous step), you should be able to verify installation of NVM by entering the following command:

nvm -v

This should give you an output with some information about the NVM version (if it was not installed you will see "bash: nvm: command not found"

If it is installed correctly, you can now install the latest version of node using it with this command: nvm install lts

@danibarker
danibarker / Installing NVM (MacOS).md
Last active August 28, 2023 01:59
Installing NVM on MacOS

Using the "Terminal" application, enter the following to install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "# Homebrew\nexport PATH=/opt/homebrew/bin:\$PATH" >> ~/.zshrc
source ~/.zshrc

Then, enter the following to install NVM using Homebrew:

brew update
openapi: '3.0.2'
info:
title: Project 1 API
description: An example API with CRUD operations
version: '1.0'
servers:
- url: http://localhost:3000/api
paths:
/users:
get:
@danibarker
danibarker / README.md
Last active March 10, 2023 03:35 — forked from gregfenton/README.md
Express: Hello World!

Express: Add "Hello World!" API

Prerequisites

  1. Initialized ExpressJS project as per this gist

Example directory structure

project-root
    ├── node_modules
 ├── package-lock.json
@danibarker
danibarker / README.md
Last active March 10, 2023 03:31 — forked from gregfenton/README.md
Express: Start and write to console

ExpressJS: Start, Listen and Console.log()

Prerequisites

  1. Initialized npm project with package.json file. See: Getting started with npm.
  2. express installed as project dependency.
  3. Entry page (i.e. server.js) present in the project root.

Example directory structure

project-root