Skip to content

Commit

Permalink
Don't use terminal prompt for single line commands (sb2nov#276)
Browse files Browse the repository at this point in the history
Having the terminal prompt makes it harder to copy-paste the command.
Only use them for examples where the output is shown, so it's obvious
that is the command and what is the result.

Search and replaced with:

  rg -F "$ " --files-with-matches | xargs sed -i '' 's/$ //g'
  • Loading branch information
simeg authored Apr 24, 2020
1 parent 09b8e77 commit 0094a73
Show file tree
Hide file tree
Showing 32 changed files with 193 additions and 193 deletions.
10 changes: 5 additions & 5 deletions Apps/Octave.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ As this distributes a compiled version of Octave, installation will be much fast

To [install using homebrew-cask](https://octave-app.org/#installing-with-homebrew-cask) run:

$ brew tap octave-app/octave-app
$ brew cask install octave-app
brew tap octave-app/octave-app
brew cask install octave-app

### Homebrew official

You can also install Octave from the official Homebrew source using the method below.

Install `octave` from core Homebrew (which is available by default):

$ brew install octave
brew install octave

**Note**: If `brew` complains about not having a formula for Octave, the following command should fix it:

$ brew tap --repair
brew tap --repair

The command below upgrades Octave and its dependencies to the latest Homebrew-supported versions:

$ brew update && brew upgrade
brew update && brew upgrade

Octave has many dependencies which will be downloaded and installed prior to Octave. **The entire installation process can take a few hours if you are compiling from source.**

Expand Down
10 changes: 5 additions & 5 deletions BashCompletion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ key. This will help you when writing the bash command in terminal.
## Installation

```bash
$ brew install bash-completion
brew install bash-completion
```

Bash completion will be installed in `/usr/local/etc/bash_completion.d`.
Expand All @@ -21,13 +21,13 @@ For it to work, add this to your `~/.bash_profile`:
Or simply type:

```bash
$ echo "[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion" >> ~/.bash_profile
echo "[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion" >> ~/.bash_profile
```

Restart your bash session:

```bash
$ source ~/.bash_profile
source ~/.bash_profile
```

## Usage
Expand All @@ -49,13 +49,13 @@ bisect cherry commit fetch grep log
You can list additional completion packages are available by typing:

```bash
$ brew search completion
brew search completion
```

And you can install them using `brew install` commands, for example:

```bash
$ brew install docker-completion
brew install docker-completion
```

*You can also manually add a bash completion file into
Expand Down
4 changes: 2 additions & 2 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ You'll need `homebrew-cask` to install Docker Toolbox, if you don't have it refe

### Installation

$ brew cask install docker-toolbox
brew cask install docker-toolbox

### Quick Start

For quick start find the newly installed _Docker Quickstart Terminal_ and double-click to launch it. Then you can start the _Hello World container_ using:

$ docker run hello-world
docker run hello-world

You can find more about Docker in the [documentation](https://docs.docker.com/).
20 changes: 10 additions & 10 deletions Git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

What's a developer without [Git](http://git-scm.com/)? To install, run:

$ brew install git
brew install git

When done, to test that it installed properly you can run:

$ git --version
git --version

And `which git` should output `/usr/local/bin/git`.

Next, we'll define your Git user (should be the same name and email you use for
[GitHub](https://github.com/)):

```sh
$ git config --global user.name "Your Name Here"
$ git config --global user.email "[email protected]"
git config --global user.name "Your Name Here"
git config --global user.email "[email protected]"
```

They will get added to your `.gitconfig` file.
Expand All @@ -26,7 +26,7 @@ password every time you push a commit you can cache your credentials by running
the following command, as described in the
[instructions](https://help.github.com/articles/caching-your-github-password-in-git/).

$ git config --global credential.helper osxkeychain
git config --global credential.helper osxkeychain

## SSH Config for GitHub

Expand All @@ -39,7 +39,7 @@ First, we need to check for existing SSH keys on your computer. We do this by
running:

```sh
$ ls -al ~/.ssh
ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
```

Expand All @@ -55,7 +55,7 @@ email. The default settings are preferred, so when you're asked to "enter a
file in which to save the key,"" just press Enter to continue.

```sh
$ ssh-keygen -t rsa -C "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
# Creates a new ssh key, using the provided email as a label
```

Expand All @@ -64,7 +64,7 @@ $ ssh-keygen -t rsa -C "[email protected]"
Run the following commands to add your SSH key to the `ssh-agent`.

```sh
$ eval "$(ssh-agent -s)"
eval "$(ssh-agent -s)"
```

If you're running macOS Sierra 10.12.2 or later, you will need to modify your
Expand All @@ -82,15 +82,15 @@ No matter what operating system version you run you need to run this command to
complete this step:

```sh
$ ssh-add -K ~/.ssh/id_rsa
ssh-add -K ~/.ssh/id_rsa
```

### Adding a new SSH key to your GitHub account

The last step is to let GitHub know about your SSH key. Run this command to copy your key to your clipboard:

```sh
$ pbcopy < ~/.ssh/id_rsa.pub
pbcopy < ~/.ssh/id_rsa.pub
```

Then go to GitHub and [input your new SSH
Expand Down
2 changes: 1 addition & 1 deletion Git/gitignore.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ node_modules

followed by running the command below, in terminal:

$ git config --global core.excludesfile ~/.gitignore
git config --global core.excludesfile ~/.gitignore

to not track files that are almost always ignored in all Git repositories.

Expand Down
22 changes: 11 additions & 11 deletions Heroku/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@

Assuming that you have an Heroku account ([sign up](https://signup.heroku.com) if you don't), let's install the [Heroku Client](https://devcenter.heroku.com/articles/using-the-cli) for the command-line using Homebrew.

$ brew install heroku/brew/heroku
brew install heroku/brew/heroku

The formula might not have the latest version of the Heroku Client, which is updated pretty often. Let's update it now:

$ heroku update
heroku update

Don't be afraid to run `heroku update` every now and then to always have the most recent version.

## Setup

Login to your Heroku account using your email and password:

$ heroku login
heroku login

If this is a new account, and since you don't already have a public **SSH key** in your `~/.ssh` directory, it will offer to create one for you. It will also upload the key to your Heroku account, which will allow you to deploy apps from this computer.

If it didn't offer create the SSH key for you (i.e. your Heroku account already has SSH keys associated with it), you can do so manually by running:

$ mkdir ~/.ssh
$ ssh-keygen -t rsa
mkdir ~/.ssh
ssh-keygen -t rsa

Keep the default file name and skip the passphrase by just hitting Enter both times. Then, add the key to your Heroku account:

$ heroku keys:add
heroku keys:add

## Usage

Once your keys are in place and you are authorized, you're ready to deploy apps. Heroku has a [getting started guide](https://devcenter.heroku.com/articles/python), which has all the information you need (the one linked here is for Python, but there is one for every popular language). Heroku uses Git to push code for deployment, so make sure your app is under Git version control.

A cheat sheet for deployment:

$ cd myapp/
$ heroku create myapp
$ git push heroku master
$ heroku ps
$ heroku logs -t
cd myapp/
heroku create myapp
git push heroku master
heroku ps
heroku logs -t

The [Heroku Dev Center](https://devcenter.heroku.com/) is where you will find more information.
8 changes: 4 additions & 4 deletions Homebrew/Cask.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ downloading `.dmg` files and dragging them to your Applications folder!
You need Homebrew on your system to use Cask, and you make Cask available by
adding it as a tap:

$ brew tap caskroom/cask
brew tap caskroom/cask

## Search

To see if an app is available on Cask you can search on the [official Cask
website](https://caskroom.github.io/). You can also search in your terminal:

$ brew search <package>
brew search <package>

## Example Applications

Expand All @@ -29,7 +29,7 @@ includes features like syntax highlighting, Markdown rendering, preview of
JSON, patch files, CSV, ZIP files and more.

```sh
$ brew cask install \
brew cask install \
qlcolorcode \
qlstephen \
qlmarkdown \
Expand All @@ -46,7 +46,7 @@ $ brew cask install \
Here are some useful apps that are available on Cask.

```sh
$ brew cask install \
brew cask install \
alfred \
android-file-transfer \
appcleaner \
Expand Down
8 changes: 4 additions & 4 deletions Homebrew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ to build things from source, and if you are missing this it's available
through the App Store > Updates. You can also install it from the terminal
by running the following:

$ sudo xcode-select --install
sudo xcode-select --install

To install Homebrew run the following in a terminal, hit **Enter**, and follow
the steps on the screen:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

### Setting up your `PATH`

Expand All @@ -28,7 +28,7 @@ You change your path by adding `/usr/local/bin` to your `PATH` environment varia
This can be done on a per-user basis by adjusting `PATH` in your `~/.bash_profile`.
To do this, run:

$ echo 'PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
echo 'PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile

(If you're using `zsh`, you should do this for `~/.zshrc` in addition to
`~/.bash_profile`.)
Expand All @@ -40,7 +40,7 @@ major shells. An admin password will be required if you modify the file.
Then, to be able to use `brew` you need to start a new terminal session. After that
you should make sure everything is working by running:

$ brew doctor
brew doctor

If everything is good, you should see no warnings, and a message that you are
"ready to brew!".
26 changes: 13 additions & 13 deletions Homebrew/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,50 @@

To install a package (or **Formula** in Homebrew vocabulary) simply type:

$ brew install <formula>
brew install <formula>

To update Homebrew's directory of formulae, run:

$ brew update
brew update

**Note**: If that command fails you can manually download the directory of
formulas like this:

$ cd /usr/local/Homebrew/
$ git fetch origin
$ git reset --hard origin/master
cd /usr/local/Homebrew/
git fetch origin
git reset --hard origin/master

To see if any of your formulas need to be updated:

$ brew outdated
brew outdated

To update a formula:

$ brew upgrade <formula>
brew upgrade <formula>

Homebrew keeps older versions of formulas installed on your system, in case you
want to roll back to an older version. That rarely is necessary, so you can do
some cleanup to get rid of those old versions:

$ brew cleanup
brew cleanup

If you want to see what formulas Homebrew would delete _without actually
deleting them_, you can run:

$ brew cleanup --dry-run
brew cleanup --dry-run

To see what you have installed (with their version numbers):

$ brew list --versions
brew list --versions

To search for formulas you run:

$ brew search <formula>
brew search <formula>

To get more information about a formula you run:

$ brew info <formula>
brew info <formula>

To uninstall a formula you can run:

$ brew uninstall <formula>
brew uninstall <formula>
2 changes: 1 addition & 1 deletion Java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

First you should check if Java is already installed

$ java -version
java -version

If you see an output like below then Java is already installed on your machine so skip to _Add Java to PATH_.

Expand Down
2 changes: 1 addition & 1 deletion MyySQL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To connect with the command-line client, run:

(Use `exit` to quit the MySQL shell)

**Note**: By default, the MySQL user `root` has no password. It doesn't really matter for a local development database. If you wish to change it though, you can use `$ mysqladmin -u root password 'new-password'`.
**Note**: By default, the MySQL user `root` has no password. It doesn't really matter for a local development database. If you wish to change it though, you can use `mysqladmin -u root password 'new-password'`.

## GUI Tool

Expand Down
Loading

0 comments on commit 0094a73

Please sign in to comment.