Ninja Space Content Tech Blog

MISC: Useful Commands, Keys and Notes

Posted by Ninja Space Content on Saturday, October 16, 2021
To find all git files in your machine type the following in the terminal: find . -name .git -type d -prune

Shortcut: Click F2 and then change the variable name and click 'enter' to change all variables that is the same as what you selected before hitting F2.

Things I didn't remember to do when trying to create my server and database from memory:
  1. Install nodemon by: npm install nodemon --save-dev
  2. To pull variable from .env after configing is process.env
  3. After creating the database name in psql. \c [database name] to make sure you're in that database to create new tables.
  4. Type \d [table name] to see schema that you've just created.
  5. PSQL is very strict. Must have a space after the table name like so for inserting data: INSERT INTO people (firstname, lastname) VALUES ('firstTest', 'lastTest');
  6. When updating PSQL database, make sure to use single quotes. Double quotes won't work. Example: UPDATE people SET firstname='James', lastname='Taylor' WHERE id=1;

Tags: psql tips  useful commands on mac 

About Ninja Space Content

Ninja Space Content I have been building simple websites on my own since 2008 and currently run several websites at the moment, including this one. I used to be an account manager for an affiliate/e-commerce company, helping affiliates grow their sales so I have some knowledge on the business side and client side of affiliate marketing. Most recently, I decided to complete a JavaScript coding bootcamp and graduated in Dec 2020.
Note: links to resources and promoting special deals may allow me to earn a small commission from each sale.