• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Twitter GitHub
You are here: Home / Archives for command line

command line

Add git status to zsh prompt

Last updated on December 29, 2020 by Sal Ferrarello

One of the things that made me much better at Git was making my current branch (and whether or not I have any changed files) always visible. By default zsh includes everything you need to do this, you just need to configure it.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Recommendations, Solution Tagged With: command line, Git, zsh

Add a Blank line at the Beginning of Command Line Prompt

Last updated on October 26, 2020 by Sal Ferrarello

While there are many ways to customization your command line prompt, one that can help readability is adding a blank line at the beginning of each prompt.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: Bash, command line, zsh

Curl Examples Posting Data and Displaying Headers

Last updated on October 1, 2019 by Sal Ferrarello

Curl is a fantastic tool for making web requests from the command line. As a developer, I find this tool particularly useful. Retrieve Content at a URL curl https://salferrarello.com/ Making a HEAD Call Sometimes, we want to see the Header Values returned from a URL using the HEAD. The HTTP HEAD method requests the headers […]

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: command line, curl

Git Previous Branch

Last updated on February 11, 2019 by Sal Ferrarello

When working with Git on the command line, I spend a lot of time switching back and forth between two branches. Even with Git tab completion, it is a lot of typing. However Git has a shortcut for the previous branch, a single dash (-).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Recommendations Tagged With: command line, Git

Curl Get Redirect

Last updated on September 25, 2018 by Sal Ferrarello

When creating 301 redirects, I often want to check multiple URLs quickly from the command line (to avoid the manual clicking in the browser and browser caching of results). I’ve written this script to speed up my process.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: command line, curl, redirects

grep inside gzipped files

Last updated on September 24, 2018 by Sal Ferrarello

When faced with a folder full of gzipped files, I found I was unable to use my usual go to program grep to search for text in the files. However, zgrep came to my rescue.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Solution Tagged With: command line, grep, gzip

DIG and WHOIS returning different name servers

Last updated on August 27, 2018 by Sal Ferrarello

You can look up the name servers associated with a domain name using either “whois” or “dig NS”. In some rare occasions, I have gotten back two different answers using these two techniques. In my experience, “dig NS” is the more trustworthy of the two.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: command line, DNS, network

Generate SSH Key Pair

Last updated on September 30, 2019 by Sal Ferrarello

Using SSH keys allows greater security than a password when remoting into a machine, using SFTP, or WP CLI on a remote machine – however, they do require more work to setup. For security reasons, I generate a new key pair for each site I work on. To generate a new key pair I do the following.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: command line, ssh

Activity Monitor find App behind Process Name

Last updated on July 30, 2018 by Sal Ferrarello

When working on my Mac, sometimes I find a process in Activity Monitor and I want to know what application the process belongs to. I was introduced to this command to do just that.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Solution Tagged With: command line

License for my Open Source Software

Last updated on August 27, 2019 by Sal Ferrarello

These are my reminder notes on how to quickly populate the LICENSE information for one of my projects from the command line.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Programming, Recommendations Tagged With: command line

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Next Page»

Copyright © 2021 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in