Npm
Install NPM Packages From GitHub
Check an npm package version within your project
Check Npm Package Version
Git
Undo a Git Pull
This post will guide you through reverting a git pull and getting you back to your previous commits and history. Also learn how to undo GitHub pull requests.
Create Folder In GitHub Repository
Learn how to create and push one or more empty directories in a Git repository using `.placeholder` and `README.md` files using both the CLI and the GitHub interface.
How To Update NPM
Learn how to update npm to a specific version using the npm, nvm, or npx commands.
Docker
Remove All Docker Images
Learn how to remove all used, unused, and dangling Docker images using the `docker rmi` and `docker image prune` commands.
List Installed Npm Packages
Learn how to list globally and locally installed packages with npm, including their dependencies.
Linux
Unix
Curl Follow Redirect(s)
Learn how to make curl automatically follow a redirect along with the most common pitfalls to avoid when doing so.
Vim
Go To Top of File in Vim
Learn how to jump the top of the file in Vim, then navigate, search, highlight, and delete.
Show Curl Headers
curl request and response headers
Change Git Origin Remote URL
change git repo URL
Git Clone, Push, And Pull Over SSH
use an SSH key for Git repos
Curl With Headers
send request headers with cURL
SQL
Import a SQL File in MYSQL
MySQL command line to run an SQL file
Bash
Run Bash Shell In Docker
start an interactive shell in Docker container
Homebrew
List Installed Packages With Brew
list the installed packages with Homebrew
Brew Uninstall Package
remove installed packages with Homebrew
Copy File From Remote To Local Using Scp
copy files and directories from a remote to local
Delete Local Git Branch
variety of situations to delete a local git branch
Save Docker Container As Image
create Docker image from existing container
Amend a Git Commit
making changes to a previous commit
Go To Line In Vim
variety of approaches to go to lines
Copy File From Container To Host
copy files and directories from a Docker container to my local machine
Curl With Basic Auth
perform a basic access authentication with cURL
Docker Remove Stopped Containers
Remove all stopped Docker containers at once
Removing Directories in Linux
How to remove directories and their content
Git Commit History
Navigate the commit history of a repo or branch
Copy File To Docker Container
how to copy files and directories from a local machine to a Docker container
Vim Go To End/Start of Line
Go to the end or beginning of a line in Vim
Undoing Git Commits
Overview of the simple way to undo a commit using git reset
How To Create a Git Repository
Creating repos in various scenarios with git
Chown Recursively
How to recursively change the ownership of files
Chmod +X
An overview of chmod +x and how to use it
Kill Command
Basic syntax and usage of the kill command
Psql
Import CSV Into Postgres
How to import data from a CSV file into a PostgreSQL table
Chmod 755
General meaning, examples, and flags for chmod 755
Exclude With Grep
Excluding unwanted key terms or directories when using grep
Grep In a Directory
Grep to search for words/phrases in directories and subdirectories
How To Reinstall Packages With Npm
Brief guide to reinstalling npm packages using npm
How To Use Unix Wildcards
How to use wildcard characters in Linux/Unix commands
Yarn
How To Update Yarn
How to update yarn and related troubleshooting
How To Run a SQL File With psql
Importing a SQL file into a PostgreSQL database with psql
Grep Across Multiple Lines
Guide on several cases of using grep across multiple lines
What Does sudo chown Do?
Why sudo chown is sudo and some common pitfalls
Run a Shell Script in a Dockerfile
When and how to run a shell script in a Dockerfile
How To Use sudo su
A quick overview of using sudo su
How to Add a User to Sudoers
Grant elevated privileges to users
POST JSON data with cURL
Different ways of sending JSON via cURL
Vi
Vim Modes
Learn about seven of Vim’s modes
Grep Count
Efficiently count lines or occurrences in a file.
Grep Multiple Strings
For two or more string, use an “or” expression (\|), or the -e flag.
Vim Find and Replace
Use either substitute or slash & dot
Select all in Vim / Vi
Select all and copy, paste, or delete the contents
mkdir if not exists
Create directories when they don’t already exist
Git Push Origin
A breakdown of git push origin
Searching in Vim
Search forward, backward, case insensitive, and more
Kill a Process in Linux
Strategies for finding and killing processes
Linux Chmod Command
Review how to best use the chmod command
Linux File Permissions Explained
Understand what common expressions do
How to use sudo rm -rf safely
We'll help you understand its components
Show & Hide Line Numbers in Vim / Vi
Toggle absolute and relative line numbers
How to run cron every hour
along with variations and examples
Go To End of File in Vim / Vi
Select and delete to the end of a file in Vim
How to run chmod recursively
Using -R is probably not what you want
Vim / Vi Page Up and Down Controls
Quick reference for Vim's page up and down controls
Bash printf
How to use string formatting with bash printf
How to delete lines in Vim / Vi
The best answer depends on which mode you use
Bash Comments
Comments will help make your scripts more readable
Python
Delete a File in Python
There are two approaches to deleting a file in Python
Bash Concatenate Strings
Join two strings together in Bash
Curl Post Request
Use cURL to send data to a server
Bash Aliases
Create an alias for common commands
Reading User Input
Via command line arguments and prompting users for input
Bash Case Statement
A popular alternative to the if-then-else statement
How to Make Grep Case Insensitive
By default, grep is case sensitive
Undo & Redo in Vim / Vi
Keyboard shortcuts and summary of how Vim tracks changes
Copy & Paste in Vim / Vi
Copy (Yank), Paste (Put) and Cut (Delete) in Vim