Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Leon Treat michaeltreat

View GitHub Profile
View Michael_Treat_LEAP_Resume.md
@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active Apr 11, 2021
Quick Cheat Sheet for Mongo DB Shell commands.
View mongodb_shell_commands.md

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

View WSL_Mongo_install.md

Install Mongo with WSL for Windows.

Home

This doc will guide you through installing Mongo DB using WSL through the Command Line.

Most of the steps are listed out here, but this guide will trim them down and make it more straight forward for our needs. There is also 1 step that is not in the link above as well, which will be noted when we come across it.

Install MongoDB Community Edition.

  1. Open a Windows PowerShell and type wsl.
@michaeltreat
michaeltreat / psql_wsl_install.md
Last active Jan 26, 2021
Postgres WSL install instructions
View psql_wsl_install.md

Install psql on WSL

Home

This install is pretty different from previous versions of psql install instructions for windows. This install uses the WSL and Ubuntu shell.

We are installing this through the Ubuntu command line which is different from the other Ubuntu install instructions because those instructions use Ubuntu's GUI, which we don't have access to here.

NOTE: Since this is a service that is running on Ubuntu, you should be in the the Ubuntu file system when running these commands!

Install

@michaeltreat
michaeltreat / Install_Node_WSL.md
Last active Apr 26, 2018
Node install instructions for WSL
View Install_Node_WSL.md

Install Node on the Windows Subsystem for Linux.

Home

Install Node

  1. Open a new shell and type wsl.
  2. Type cd ~/../../.
  3. Type sudo apt-get update
  4. Copy these two lines and paste them into the terminal:
@michaeltreat
michaeltreat / WSL_terminal.md
Last active May 11, 2018
Update Windows PowerShell Ubuntu Terminal
View WSL_terminal.md

Update the WSL Ubuntu Terminal

Home

Typically we will always be working in the Windows PowerShell, but for this task we need to be in the Ubuntu app because we need to edit a file in the Ubuntu File System.

It is also highly recommended that you DO NOT edit a file in the Ubuntu system from Windows or through a Windows app as there will be errors, so we are doing this the right way by going through Ubuntu's commandline editor Nano.

At the end, this will add some coloring to your command line, and you command line will be formatted like this:

PathToCurrentDirectory[GitStatus]$

View Windows_201_WSL_setup.md

Note: This doc is currently being updated.

Windows 201 WSL setup

Preface

WSL stands for Windows Subsystem for Linux and it is a feature that you can enable on Windows 10 machines. It allows for you to add a Linux subsystem to your Windows machine. This subsystem will allow you to run programs and files in a POSIX or Unix-like environment, which solves many common issues that Windows users face when trying to run software that is developed for Linux.

Before you begin check to make sure that you have the most recent version of Windows 10.

@michaeltreat
michaeltreat / heroku_pg:push_workaround.md
Last active Mar 16, 2021
Quick workaround for pushing your local database to heroku for windows machines.
View heroku_pg:push_workaround.md

Workaround for pushing to heroku database on windows machince.

Context:

The command heroku pg:push essentially executes two commands under the hood. First, it executes pg_dump, which makes a backup file of a specific database. Then, it pipes that file into pg_restore, where it takes that dump file and uses it to restore another database. The way we usually use it is to push a local database to a deployed heroku database.

The problem is that on windows, the command breaks while trying to pipe in the backup file from pg_dump to pg_restore, so we need to do these two commands manually.

Solution: