Code Monkey home page Code Monkey logo

laptop's Introduction

Laptop

Build Status

Laptop is a script to set up an OS X computer for web development, and to keep it up to date.

It can be run multiple times on the same machine safely. It installs, upgrades, or skips packages based on what is already installed on the machine.

Requirements

We support:

Older versions may work but aren't regularly tested. Bug reports for older versions are welcome.

Install

Begin by opening the Terminal application on your Mac. The easiest way to open an application in OS X is to search for it via Spotlight. The default keyboard shortcut for invoking Spotlight is command-Space. Once Spotlight is up, just start typing the first few letters of the app you are looking for, and once it appears, press return to launch it.

In your Terminal window, copy and paste the command below, then press return.

bash <(curl -s https://raw.githubusercontent.com/18F/laptop/master/laptop)

The script itself is available in this repo for you to review if you want to see what it does and how it works.

Note that the script will ask you to enter your OS X password at various points. This is the same password that you use to log in to your Mac. If you don't already have it installed, GitHub for Mac will launch automatically at the end of the script so you can set up everything you'll need to push code to GitHub.

Once the script is done, make sure to quit and relaunch Terminal.

More detailed instructions with a video are available in the Wiki.

It is highly recommended to run the script regularly to keep your computer up to date. Once the script has been installed, you'll be able to run it at your convenience by typing laptop and hitting return in your Terminal.

Want to install just git-seekret?

In your terminal window, copy and paste the following line, and press return:

curl -s https://raw.githubusercontent.com/18F/laptop/master/seekrets-install | bash -

Note that the script may ask you to enter your password. This is the same password that you use to log in to your computer.

git-seekret requires git 2.9.1 or higher. Some versions of Ubuntu ship with an older version. To update your git before installing git-seekret:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update

git-seekret will install global git hooks into ~/.git-support/hooks. To restore pre-existing git hooks, it is recommended to save pre-existing hooks into a separate directory and to copy those hooks into ~/.git-support/hooks after git-seekret is installed.

Development

Git Seekret

This section covers contributing and developing new rulesets for git-seekrets.

The rules installed by the seekret-install script are located in the seekret-rules directory at the root of this repository. Inside each rule file is a list of rules. The rule file can be considered a tree with the rules as the leaves of the tree.

An example rule file is below:

thing_to_match:
  match: r[egx]{2,}p?
  unmatch:
    - some_prefix\s*r[egx]{2,}p?
    - r[egx]{2,}p?\s*some_suffix

Using the example above, let's break down each stanza:

  • thing_to_match : The name of the rule we'd like to match / unmatch. This can be anything that makes sense for the .rule file being created / edited.
  • match : A single regular expression which will be used to match any rules for the name above.
  • unmatch : A list of regular expressions which will be used to unmatch anything that the match rule matches.

Feel free to submit an issue/create a pull request in order to submit a new ruleset or to apply a modifification to an existing ruleset.

Testing Git Seekrets

You can test secret rulesets using BATS for automated testing and manually using the installation script.

Let's talk about BATS

Please read the local BATS documentation.

Let's talk about local manual testing

To install the *.rule files located in the repo, just run the installation script locally. This will update your local ~/.git-support/seekret-rules directory with the changes in this repository.

./seekrets-install

You should now be able to run the check within any repository on your machine.

git seekret check -c 0 # check for secrets within commit history
git seekret check -s # check for secrets within staged files

Debugging

Your last Laptop run will be saved to ~/laptop.log. Read through it to see if you can debug the issue yourself. If not, copy and paste the entire log into a new GitHub Issue for us.

Git Seekrets False Positives

Sometimes the git-seekrets rules may indicate a false positive and match things that aren't actually secrets. This can happen if the regular expressions used to match and unmatch are too strict.

Make sure you have the latest rulesets from this repository by running the git-seekrets installation script.

If the ruleset is still triggering a false positive, please open an issue (or a pull request if you know how to fix the regular expression), and include the text that is being treated as a false positive, along with the rules installed on your computer. Please run this command to output your current rules, then copy and paste them into the GitHub issue:

cat ~/.git-support/seekret-rules/*.rule

What it sets up

  • ChromeDriver for headless website testing
  • chruby for managing Ruby versions
  • Cloud Foundry CLI for command line access to 18F's Cloud Foundry-based application platform
  • Docker for all your containerization needs
  • git-seekret for preventing you from committing passwords and other sensitive information to a git repository
  • [GitHub Desktop] for setting up your SSH keys automatically
  • Homebrew for managing operating system libraries
  • Homebrew Cask for quickly installing Mac apps from the command line
  • Homebrew Services so you can easily stop, start, and restart services
  • hub for interacting with the GitHub API
  • [nvm] for managing Node.js versions if you do not have Node.js already installed (Includes latest Node.js and NPM, for running apps and installing JavaScript packages)
  • pyenv for managing Python versions if you do not have Python already installed (includes the latest 3.x Python)
  • ruby-install for installing different versions of Ruby
  • Slack for communicating with your team
  • The Silver Searcher for finding things in files
  • Virtualenv for creating isolated Python environments (via pyenv if it is installed)
  • Virtualenvwrapper for extending Virtualenv (via pyenv if it is installed)
  • Zsh as your shell

It should take less than 15 minutes to install (depends on your machine and internet connection).

Customize in ~/.laptop.local and ~/Brewfile.local

Your ~/.laptop.local is run at the end of the mac script. Put your customizations there. If you want to install additional tools or Mac apps with Homebrew, add them to your ~/Brewfile.local. This repo already contains a .laptop.local and Brewfile.local you can use to get started.

# Go to your OS X user's root directory
cd ~

# Download the sample files to your computer
curl --remote-name https://raw.githubusercontent.com/18F/laptop/master/.laptop.local
curl --remote-name https://raw.githubusercontent.com/18F/laptop/master/Brewfile.local

It lets you install the following tools and apps:

  • VSCode - Microsoft's open source text editor
  • Atom - GitHub's open source text editor
  • Sublime Text 3 for coding all the things
  • Vim for those who prefer the command line
  • Exuberant Ctags for indexing files for vim tab completion
  • Firefox for testing your website on a browser other than Chrome
  • iTerm2 - an awesome replacement for the OS X Terminal
  • reattach-to-user-namespace to allow copy and paste from Tmux
  • Tmux for saving project state and switching between projects
  • Spectacle - automatic window manipulation

Write your customizations such that they can be run safely more than once. See the mac script for examples.

Laptop functions such as fancy_echo and gem_install_or_update can be used in your ~/.laptop.local.

What about background services (Redis, Postgres, MySQL, etc.)?

The script does not automatically install services like databases because you may not need any particular one, or you may need specific versions, not just the latest. For services, we recommend using Docker. For example, you can use the [docker run] command to start a service in a container and make the container's port available to your local machine:

docker run -p 5432 postgres:10.6

You can also use Docker Compose to define your app's containers and their relationships, cutting out the need to manually setup each service.

How to switch your shell back to bash from zsh (or vice versa)

  1. Find out which shell you're currently running: echo $SHELL

  2. Find out the location of the shell you want to switch to. For example, if you want to switch to bash, run which bash.

  3. Verify if the shell location is included in /etc/shells. Run cat /etc/shells to see the contents of the file.

  4. If the location of the shell is included, run chsh -s [the location of the shell]. For example, if which bash returned /bin/bash, you would run chsh -s /bin/bash.

    If the location of the shell is not in /etc/shells, add it, then run the chsh command. If you have Sublime Text, you can open the file by running subl /etc/shells.

  5. Quit and restart Terminal (or iTerm2), or open a new tab for the new shell to take effect.

Whether you're using bash or zsh, we recommend installing the latest versions with Homebrew because the versions that came with your Mac are really old.

brew install bash

or

brew install zsh

Credits

The 18F laptop script is based on and inspired by thoughtbot's laptop script.

Public domain

thoughtbot's original work remains covered under an MIT License.

18F's work on this project is in the worldwide public domain, as are contributions to our project. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

laptop's People

Contributors

adborden avatar afeld avatar alain-hoang avatar amirbey avatar amoose avatar bobclewell avatar cannandev avatar ccostino avatar cjhskippy avatar cmc333333 avatar cnelson avatar cryptofilegsa avatar cwonrails avatar ericschles avatar fureigh avatar hillaryj avatar konklone avatar linuxbozo avatar mgwalker avatar mitchellhenke avatar mogul avatar monfresh avatar openbrian avatar rahearn avatar rogeruiz avatar sharms avatar stvnrlly avatar tbaxter-18f avatar ultrasaurus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laptop's Issues

Testing of seekrets rulesets using BATS

In order to ensure that our regex rules are correct, they should be tested, using BATS and run automatically with Travis.

Rulesets for git-seekrets are defined as regex inside a yaml file. These include rule name, the regex for the match, and any acceptable false positives as unmatch. Existing rulesets that need tests defined are here:
https://github.com/18F/laptop/tree/seekret/seekret-rules

Depends on #75 for easier implementation.

If fixing, please use seekret branch so it's merged into PR #69

More about the rules YAML: https://github.com/apuigsech/seekret/blob/75ab481819b4c1e1794497defea9a9332943295b/README.rst#rules

Acceptance Criteria

  • Install git seekret in a repeatable way ( should be covered in another story )
  • Install BATS in a repeatable way, readme
  • Write BATS tests for each of these:
    • Check for git seekret installation.
    • Check for rulesets enabled.
    • Check that git seekret is called on a test repository and secrets are detected. (positives)
    • Check that git seekret is called on a test repository and non-secrets are not detected. (acceptable false positives)

Update seekrets-install script to use generated binary from build script

The seekrets-install script currently uses the go get method for installing the git-seekrets command.

A build script that can generate the git-seekrets binary is already inside of the repository. Until regular official build releases from upstream are ready, theseekrets install script could install the binary artifact generated from the build script and avoid duplicating the effort from the build script.

Customize zsh prompt to display username and other useful info

By default, the zsh prompt does not display your OS username, or your current directory, unlike the default bash prompt. Since the script changes the shell to zsh, it should also update the prompt to display useful info, such as the username, current directory, and current ruby version.

New seekret ruleset for Mandrill/Mailchimp

As as developer with access to Mandrill, I want to make sure that I'm not accidentally checking in my Mandrill API key.

Implementation:
Building on #74, a new set of BATS tests, and rule file which contains any match/unmatch regex should be included.

If fixing, please use seekret branch so it's merged into PR #69

Suggestions for language for making the script interactive

Suggestions for a helpful style of interactive language for when the script is split into conceptual/task-oriented sections:

If you plan to work on Python projects, we recommend this set of tools to get a flexible development environment set up quickly. This includes: pyenv (for managing Python versions if you do not have Python already installed; includes the latest 3.x Python), virtualenv (for creating isolated Python environments; via pyenv if it is installed), and virtualenvwrapper (for extending Virtualenv; via pyenv if it is installed). Want to install this set? y/n

Or:

If you don’t already have a favorite set of OS X apps for doing development work, we have some recommendations. This includes: Sublime Text (a nice text editor), f.lux (for adjusting your Mac's display color so you can sleep better), GitHub Desktop (for setting up your SSH keys automatically), CloudApp (for sharing screenshots and making an animated GIF from a video), and The Silver Searcher (for finding things in files). Want to install this set? y/n

Or:

OS X comes set up with bash as the default shell, which works fine for development. Some of us like using zsh, which is less common but has some extra features for customization and tab completion. Want to switch your shell to zsh? (If you're not sure, sticking with bash is fine.) y/n

The idea would be: start each set by explaining the problem that it solves, list what it installs (and what each tool is for), make it clear that they're recommendations, and end the description by asking yes/no.

Ideally, make each set description and tool description match the descriptions on this readme, and make the sets line up with a corresponding page of more detailed documentation when possible (such as the Python set lining up with the Python dev environment guide). Link to the matching documentation from the readme.

El Capitan version?

Is there a version for El Capitan? I tried to run it to see if it would work anyway but it failed :(

Recent git-secrets integration is causing false positives

I ran the script on my machine, and now that I'm trying to commit to a project, I'm getting this error:

app/models/user.rb:10:  enum role: { user: 0, tech: 1, admin: 2 }
app/services/analytics.rb:3:    @user = user
config/initializers/ahoy.rb:10:            e.user = user

[ERROR] Matched one or more prohibited patterns

Possible mitigations:
- Mark false positives as allowed using: git config --add secrets.allowed ...
- Mark false positives as allowed by adding regular expressions to .gitallowed at repository's root directory
- List your configured patterns: git config --get-all secrets.patterns
- List your configured allowed patterns: git config --get-all secrets.allowed
- List your configured allowed patterns in .gitallowed at repository's root directory
- Use --no-verify if this is a one-time false positive

@LinuxBozo any idea what would cause this?

git secrets commands aren't safe to run multiple times

@LinuxBozo I ran the script again after merging your latest PR. That was the first time I tried running the script multiple times with the git commit changes (I should have tested this earlier). It failed at some point. Not exactly sure where. Here is the log:

✓ Installed commit-msg hook to /Users/moncefbelyamani/.git-secrets/hooks/commit-msg
✓ Installed pre-commit hook to /Users/moncefbelyamani/.git-secrets/hooks/pre-commit
✓ Installed prepare-commit-msg hook to /Users/moncefbelyamani/.git-secrets/hooks/prepare-commit-msg
failed

[ git-seekrets ] Thought a NEW RELIC key was an AWS key

Because the AWS rules check for a KEY and NEW_RELIC_LICENSE_KEY contains that word, we'll need to have an unmatch somewhere to avoid the other one.

Acceptance Criteria

  • AWS shouldn't match the New Relic license key by not matching NEW_RELIC

Download & enable rulesets during installation of seekrets

As a new user to git-seekret I want to be able to run one script to install everything I need to start using these hooks to stop committing sensitive information.

Implementation:
See TODO items in seekrets-install. Initially, the rules can be downloaded using a reference to the seekret branch of this repo for testing, will need to reference master for merge.
Added bonus points related to enabling rules: apuigsech/git-seekret#12

If fixing, please use seekret branch so it's merged into PR #69

Check for git version 2.9+ when installing seekrets

In order to make sure sure that seekrets works as intended, the user should have git 2.9+ installed. git 2.9 added a feature that allows setting a global directory to find hooks. This allows seekrets to work without having to find/modify any existing repositories.

Implementation:
seekrets-install should check for proper version, and ask/allow user to upgrade with homebrew if version is too old.

If fixing, please use seekret branch so it's merged into PR #69

Error on install

I just tried installing this on my personal machine and got this error. Not sure if it's specific to me or not, but wanted to share:

Updating Homebrew formulas ...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': /usr/local/Library/Homebrew/download_strategy.rb:88: invalid multibyte escape: /^\037\213/ (SyntaxError)
invalid multibyte escape: /^\037\235/
invalid multibyte escape: /^\xFD7zXZ\x00/
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/formula.rb:1:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/tab.rb:3:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/bottles.rb:1:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/global.rb:1:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bin/brew:10:in `<main>'
failed

SHA1 error when running laptop script

When running the laptop script, I got the following error in the laptop.log file

Installing cf-cli ...
==> Installing cf-cli from cloudfoundry/tap
==> Downloading https://cli.run.pivotal.io/stable?release=macosx64-binary&version=6.15.0&source=homebrew
==> Downloading from http://go-cli.s3-website-us-east-1.amazonaws.com/releases/v6.15.0/cf-cli_6.15.0_osx.tgz
Error: SHA1 mismatch
Expected: 1179c8e60395bb8a6b6bc5eb2880a3470106dec6
Actual: fba9d38ea53c794e58fb4273658c07d13b771722
Archive: /Library/Caches/Homebrew/cf-cli-6.15.0.0&source=homebrew
To retry an incomplete download, remove the file above.

For reference below is the contents of .laptop.local (installing the optional apps sans firefox)

#!/bin/sh
fancy_echo 'Executing laptop.local'

brew_cask_install 'atom'
# brew_cask_install 'firefox'
brew_cask_install 'iterm2'

brew_install_or_upgrade 'vim'
brew_install_or_upgrade 'ctags'
brew_install_or_upgrade 'tmux'
brew_install_or_upgrade 'reattach-to-user-namespace'

brew_install_or_upgrade 'go' && append_to_file "$HOME/.zshrc" 'export PATH="$PATH:/usr/local/opt/go/libexec/bin"'

Bash functions for determining latest Python 3 version is broken

With the latest release, brew info python3 is returning development versions as well as the latest stable release, such as:

python3: stable 3.5.1 (bottled), devel 3.6.0a1, HEAD

This is causing our sed and egrep functions to return both 3.5.1 and 3.6.0, which causes pyenv install "$latest_python_3" to fail.

We need to improve the extraction of the stable version number.

Script failing on new mac

Hey @monfresh,

Tried running this on a new mac and got an error around bundler. I was prompted to install Xcode tools early on and installed the Atom editor. Otherwise, this is a pretty clean slate?

Hugs,
-Andrew

~/laptop.log

Changing your shell to zsh ...
Changing shell for andrewmaier.

Installing Homebrew ...
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
==> The following directories will have their group set to admin:
/usr/local/.
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/.

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/.
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
From https://github.com/Homebrew/homebrew

  • [new branch] master -> origin/master
    HEAD is now at e2c6f86 pjproject: add 2.3 bottle.
    ==> Installation successful!
    ==> Next steps
    Run brew help to get started

Updating Homebrew formulas ...
Already up-to-date.

Installing git ...
==> Downloading https://homebrew.bintray.com/bottles/git-2.3.5.yosemite.bottle.tar.gz
==> Pouring git-2.3.5.yosemite.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain

The "contrib" directory has been installed to:
/usr/local/share/git-core/contrib

Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completion has been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/git/2.3.5: 1363 files, 31M

Installing the_silver_searcher ...
==> Installing dependencies for the_silver_searcher: pcre, xz
==> Installing the_silver_searcher dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.36.yosemite.bottle.tar.gz
==> Pouring pcre-8.36.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/pcre/8.36: 146 files, 5.9M
==> Installing the_silver_searcher dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.1.yosemite.bottle.tar.gz
==> Pouring xz-5.2.1.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.1: 59 files, 1.7M
==> Installing the_silver_searcher
==> Downloading https://homebrew.bintray.com/bottles/the_silver_searcher-0.29.1.yosemite.bottle.tar.gz
==> Pouring the_silver_searcher-0.29.1.yosemite.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/the_silver_searcher/0.29.1: 8 files, 112K

Tapping gapple/services...
Tapped 0 formulae

Installing postgresql ...
==> Installing dependencies for postgresql: openssl, readline
==> Installing postgresql dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.yosemite.bottle.tar.gz
==> Pouring openssl-1.0.2a-1.yosemite.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2a-1: 463 files, 18M
==> Installing postgresql dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.yosemite.bottle.tar.gz
==> Pouring readline-6.3.8.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
🍺 /usr/local/Cellar/readline/6.3.8: 40 files, 2.1M
==> Installing postgresql
==> Downloading https://homebrew.bintray.com/bottles/postgresql-9.4.1.yosemite.bottle.1.tar.gz
==> Pouring postgresql-9.4.1.yosemite.bottle.1.tar.gz
==> Caveats
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
Homebrew/legacy-homebrew#2510

To migrate existing data from a previous major version (pre-9.4) of PostgreSQL, see:
http://www.postgresql.org/docs/9.4/static/upgrading.html

To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
postgres -D /usr/local/var/postgres
==> /usr/local/Cellar/postgresql/9.4.1/bin/initdb /usr/local/var/postgres
==> Summary
🍺 /usr/local/Cellar/postgresql/9.4.1: 2996 files, 40M

Restarting postgres...
==> Successfully started postgresql (label: homebrew.mxcl.postgresql)

Installing mysql ...
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.6.23.yosemite.bottle.tar.gz
==> Pouring mysql-5.6.23.yosemite.bottle.tar.gz
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

To connect:
mysql -uroot

To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
==> /usr/local/Cellar/mysql/5.6.23/bin/mysql_install_db --verbose --user=andrewmaier --basedir=/usr/local/Cellar/mysql/5.6.23 --datadir=/usr/local/var/mysql --tmpdir=/tmp
==> Summary
🍺 /usr/local/Cellar/mysql/5.6.23: 9687 files, 339M

Restarting mysql...
==> Successfully started mysql (label: homebrew.mxcl.mysql)
Starting MySQL
SUCCESS!

Installing redis ...
==> Downloading https://homebrew.bintray.com/bottles/redis-2.8.19.yosemite.bottle.tar.gz
==> Pouring redis-2.8.19.yosemite.bottle.tar.gz
==> Caveats
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf
==> Summary
🍺 /usr/local/Cellar/redis/2.8.19: 10 files, 1.4M

Restarting redis...
==> Successfully started redis (label: homebrew.mxcl.redis)

Installing imagemagick ...
==> Installing dependencies for imagemagick: libtool, jpeg, libpng, freetype
==> Installing imagemagick dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6.yosemite.bottle.tar.gz
==> Pouring libtool-2.4.6.yosemite.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺 /usr/local/Cellar/libtool/2.4.6: 69 files, 3.8M
==> Installing imagemagick dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-8d.yosemite.bottle.2.tar.gz
==> Pouring jpeg-8d.yosemite.bottle.2.tar.gz
🍺 /usr/local/Cellar/jpeg/8d: 18 files, 776K
==> Installing imagemagick dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.16.yosemite.bottle.tar.gz
==> Pouring libpng-1.6.16.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/libpng/1.6.16: 17 files, 1.3M
==> Installing imagemagick dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.5.5.yosemite.bottle.tar.gz
==> Pouring freetype-2.5.5.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/freetype/2.5.5: 60 files, 2.6M
==> Installing imagemagick
==> Downloading https://homebrew.bintray.com/bottles/imagemagick-6.9.1-0.yosemite.bottle.tar.gz
==> Pouring imagemagick-6.9.1-0.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/imagemagick/6.9.1-0: 1442 files, 22M

Installing qt ...
==> Downloading https://homebrew.bintray.com/bottles/qt-4.8.6.yosemite.bottle.6.tar.gz
==> Pouring qt-4.8.6.yosemite.bottle.6.tar.gz
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.

.app bundles were installed.
Run brew linkapps qt to symlink these to /Applications.
==> Summary
🍺 /usr/local/Cellar/qt/4.8.6: 2790 files, 122M

Installing hub ...
==> Downloading https://homebrew.bintray.com/bottles/hub-2.2.0.yosemite.bottle.tar.gz
==> Pouring hub-2.2.0.yosemite.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completion has been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/hub/2.2.0: 9 files, 9.5M

Installing node ...
==> Downloading https://homebrew.bintray.com/bottles/node-0.12.2_1.yosemite.bottle.tar.gz
==> Pouring node-0.12.2_1.yosemite.bottle.tar.gz
==> Caveats
If you update npm itself, do NOT use the npm update command.
The upstream-recommended way to update npm is:
npm install -g npm@latest

Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/node/0.12.2_1: 2603 files, 28M

Installing python3 ...
==> Installing dependencies for python3: sqlite, gdbm
==> Installing python3 dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.8.8.3.yosemite.bottle.tar.gz
==> Pouring sqlite-3.8.8.3.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

OS X provides an older sqlite3.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/usr/local/opt/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include

==> Summary
🍺 /usr/local/Cellar/sqlite/3.8.8.3: 9 files, 2.1M
==> Installing python3 dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.11.yosemite.bottle.2.tar.gz
==> Pouring gdbm-1.11.yosemite.bottle.2.tar.gz
🍺 /usr/local/Cellar/gdbm/1.11: 17 files, 532K
==> Installing python3
==> Downloading https://homebrew.bintray.com/bottles/python3-3.4.3.yosemite.bottle.8.tar.gz
==> Pouring python3-3.4.3.yosemite.bottle.8.tar.gz
==> Caveats
Pip and setuptools have been installed. To update them
pip3 install --upgrade pip setuptools

You can install Python packages with
pip3 install

They will install into the site-package directory
/usr/local/lib/python3.4/site-packages

See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

.app bundles were installed.
Run brew linkapps python3 to symlink these to /Applications.
==> /usr/local/Cellar/python3/3.4.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3.4.3/bin --install-lib=/usr/local/lib/python3.4/site-packages
==> /usr/local/Cellar/python3/3.4.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3.4.3/bin --install-lib=/usr/local/lib/python3.4/site-packages
==> Summary
🍺 /usr/local/Cellar/python3/3.4.3: 4643 files, 81M
You are using pip version 6.1.0, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Installing virtualenvwrapper...
You are using pip version 6.1.0, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting virtualenvwrapper
Downloading virtualenvwrapper-4.3.2.tar.gz (86kB)
Collecting virtualenv (from virtualenvwrapper)
Downloading virtualenv-12.1.1-py2.py3-none-any.whl (1.6MB)
Collecting virtualenv-clone (from virtualenvwrapper)
Downloading virtualenv-clone-0.2.5.tar.gz
Collecting stevedore (from virtualenvwrapper)
Downloading stevedore-1.3.0-py2.py3-none-any.whl
Skipping requirement: argparse (from stevedore->virtualenvwrapper) because argparse is a stdlib package
Collecting pbr!=0.7,<1.0,>=0.6 (from stevedore->virtualenvwrapper)
Downloading pbr-0.10.8-py2.py3-none-any.whl (70kB)
Collecting six>=1.9.0 (from stevedore->virtualenvwrapper)
Downloading six-1.9.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pip in /usr/local/lib/python3.4/site-packages/pip-6.1.0-py3.4.egg (from pbr!=0.7,<1.0,>=0.6->stevedore->virtualenvwrapper)
Installing collected packages: virtualenv, virtualenv-clone, pbr, six, stevedore, virtualenvwrapper
Running setup.py install for virtualenv-clone
Running setup.py install for virtualenvwrapper
Successfully installed pbr-0.10.8 six-1.9.0 stevedore-1.3.0 virtualenv-12.1.1 virtualenv-clone-0.2.5 virtualenvwrapper-4.3.2

Installing RVM and the latest Ruby...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 184 100 184 0 0 215 0 --:--:-- --:--:-- --:--:-- 215

100 22817 100 22817 0 0 16640 0 0:00:01 0:00:01 --:--:-- 16640
Turning on auto dotfiles mode.
Downloading https://github.com/wayneeseguin/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/wayneeseguin/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
Found PGP signature at: 'https://github.com/wayneeseguin/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc',
but no GPG software exists to validate it, skipping.

Installing RVM to /Users/andrewmaier/.rvm/
Adding rvm PATH line to /Users/andrewmaier/.profile /Users/andrewmaier/.mkshrc /Users/andrewmaier/.bashrc /Users/andrewmaier/.zshrc.
Adding rvm loading line to /Users/andrewmaier/.profile /Users/andrewmaier/.bash_profile /Users/andrewmaier/.zlogin.
Installation of RVM in /Users/andrewmaier/.rvm/ is almost complete:

  • To start using RVM you need to run source /Users/andrewmaier/.rvm/scripts/rvm
    in all your open shell windows, in rare cases you need to reopen all shell windows.

andrewmaier,

Thank you for using RVM!

We sincerely hope that RVM helps to make your life easier and more enjoyable!!!

~Wayne, Michal & team.

In case of problems: �[32mhttp://rvm.io/help �[33mand �[32mhttps://twitter.com/rvm_io
rvm 1.26.11 (latest) by Wayne E. Seguin [email protected], Michal Papis [email protected] [https://rvm.io/]
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.10/x86_64/ruby-2.2.1.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
�[32mUpdating system�[0m|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�.
�[32mInstalling required packages: autoconf, automake, pkg-config, libyaml, libksba�[0m|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
ruby-2.2.1 - #configure
ruby-2.2.1 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6516k 100 6516k 0 0 8590k 0 --:--:-- --:--:-- --:--:-- 8596k
ruby-2.2.1 - #validate archive
ruby-2.2.1 - #extract
ruby-2.2.1 - #validate binary
ruby-2.2.1 - #setup
ruby-2.2.1 - #gemset created /Users/andrewmaier/.rvm/gems/ruby-2.2.1@global
�[32mruby-2.2.1 - #importing gemset /Users/andrewmaier/.rvm/gemsets/global.gems�[0m|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�.
�[32mruby-2.2.1 - #generating global wrappers�[0m|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�.
ruby-2.2.1 - #gemset created /Users/andrewmaier/.rvm/gems/ruby-2.2.1
ruby-2.2.1 - #importing gemsetfile /Users/andrewmaier/.rvm/gemsets/default.gems evaluated to empty gem list
�[32mruby-2.2.1 - #generating default wrappers�[0m|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�.
Updating certificates in '/etc/openssl/cert.pem'.
mkdir: /etc/openssl: Permission denied
mkdir -p "/etc/openssl" failed, retrying with sudo
and sudo mkdir worked
�[32mCreating alias default for ruby-2.2.1�[0m|�/�-�\�|�/�-�\�|�.-�\�|�/�-�\�|�/�-�.|�/�-�\�|�/�-�\�|�.

  • To start using RVM you need to run source /Users/andrewmaier/.rvm/scripts/rvm
    in all your open shell windows, in rare cases you need to reopen all shell windows.

Updating Rubygems...
Latest version currently installed. Aborting.

Updating bundler ...
Updating installed gems
Nothing to update

Configuring Bundler ...
mac: line 199: bundle: command not found

Use 18f repo version for git-seekret

The 18f version of the git-seekret repo has some requested fixes that are required to work within 18f's environment that are still pending in upstream.

For now, use the 18f version of the repos until upstream incorporates requested changes necessary for 18f

Use GNU based coreutils instead of built-in OSX BSD style utilities

This is more of a question/discussion point than actual issue, but considering most deployment/VM platforms are Linux based, which use the suite of GNU utilities (ls, basename, cut, etc), would it make sense to have brew install coreutils and insert those into the $PATH first position. This would make sure that any time you are using these utilities, they are consistent both locally, and in a deployed/VM environment.

NVM installation causes script to fail

Here is the log output:

Checking on Node.js installation...

Installing nvm and lts Node.js and npm...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10007  100 10007    0     0  15004      0 --:--:-- --:--:-- --:--:-- 15002
=> Downloading nvm from git to '/Users/moncef/.nvm'
=> Cloning into '/Users/moncef/.nvm'...
* (HEAD detached at v0.31.7)
  master

=> Appending source string to /Users/moncef/.zshrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="/Users/moncef/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
mac: line 133: nvm: command not found
failed

Note that for the script to have access to nvm, those commands need to be run.

cc @msecret

Script Ending on Image Magick

The script is ending I think before the whole thing has finished. Below is the relevant portion of my terminal output:

Installing imagemagick ... ==> Installing dependencies for imagemagick: libtool, jpeg, libpng, libtiff, freetype ==> Installing imagemagick dependency: libtool ==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6.el_capitan.bottle.tar.gz ==> Pouring libtool-2.4.6.el_capitan.bottle.tar.gz Error: undefined method <' for nil:NilClass
Please report this bug:
https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formula_support.rb:21:in valid?' /usr/local/Library/Homebrew/formula.rb:843:in keg_only?'
/usr/local/Library/Homebrew/formula_installer.rb:590:in link' /usr/local/Library/Homebrew/formula_installer.rb:450:in finish'
/usr/local/Library/Homebrew/formula_installer.rb:418:in install_dependency' /usr/local/Library/Homebrew/formula_installer.rb:368:in block in install_dependencies'
/usr/local/Library/Homebrew/formula_installer.rb:368:in each' /usr/local/Library/Homebrew/formula_installer.rb:368:in install_dependencies'
/usr/local/Library/Homebrew/formula_installer.rb:175:in install' /usr/local/Library/Homebrew/cmd/install.rb:215:in install_formula'
/usr/local/Library/Homebrew/cmd/install.rb:94:in block in install' /usr/local/Library/Homebrew/cmd/install.rb:94:in each'
/usr/local/Library/Homebrew/cmd/install.rb:94:in install' /usr/local/Library/brew.rb:143:in

'
failed`

Instructions on how to run BATS locally for git-seekrets

Once #74 is addressed, it would be helpful for developers to have instructions on how to setup and run the tests locally.

The instructions (and possible additional script logic) should preserve their current rules prior to running the tests locally and should restore their rules after the tests.

Extra considerations:
May want to trap the Ctrl-C signal (and maybe other signals) so that if a developer pushes Ctrl-C, it will cleanup before exiting. Example: A clean_up function section in http://linuxcommand.org/wss0160.php

Acceptance Criteria

  • Documentation for #74

Include Python 2 and Python 3?

Not sure what other Python devs at 18F do, but I installed Python 2 and Python 3 on my laptop. I find it handy to default to 3 with an option to point new virtualenvs to Python2 in specific cases.

Jekyll?

What about gem install jekyll. We use it a lot 'round here...

Bundler error

Hey not sure if it is only affecting me but the script runs fine up until it comes to install/update bundler, I resolved it with manually installing bundler and the script runs fine afterwards with no modifications. Hope this is of some help.

GitHub.app does not exist

I believe the script thinks I have the Github app installed (I don't currently). Here is the last bit of the log output. I'm on Mac OSX Yosemite 10.10.5.

Installing cloudfoundry-cli ...
==> Installing cloudfoundry-cli from pivotal/homebrew-tap
==> Downloading https://cli.run.pivotal.io/stable?release=macosx64-binary&version=6.13.0&source=homebrew
==> Downloading from http://go-cli.s3-website-us-east-1.amazonaws.com/releases/v6.13.0/cf-darwin-amd64.tgz
🍺 /usr/local/Cellar/cloudfoundry-cli/6.13.0: 2 files, 19M, built in 3 seconds
The file /Users/michaelbarnicle/Applications/GitHub.app does not exist.

Testing that GitHub Desktop uses git-seekret hooks

Once installation and setup for git-seekrets is finished, tests with the GitHub Desktop client should be performed in order to verify that the GitHub Desktop client will also work with git-seekrets.

Considerations for this task

  • git seekrets has been installed
  • git seekrets is configured to detect baseline rule of secrets
  • hooks are in place for repos that will be tested

nvm environment variable

export NVM_DIR="/Users/mathewcaughron/.nvm"
If you are reporting an issue with the script, please fill out the details
below to help us troubleshoot the error.

OS X version you are using

Did you recently upgrade from a previous OS X version?

Are you running the script on a fresh OS X installation?

Did you have any of the following tools installed before running the script?

  • Xcode
  • Apple's command line tools
  • Anything the script installs (see "What it sets up" in the README)

Copy and paste the entire contents of laptop.log, or attach it

Use Brewfiles rather than bespoke brew-automation code

I found out that brew can take a Brewfile now and combined with brew cask a lot of the bespoke code in the laptop script for automation of brew is probably redundant. The user-facing messages aren’t as friendly, but it does make it very tidy to maintain everything… See my bootstrap script and my Brewfiles. You can brew bundle --file=$BREWFILE repeatedly with no ill effects due to the packages already being installed.

Brewfiles can include “tap” and “brew” commands, but they don’t understand “cask”. So casks still need to get managed separately unless we make it work, then send a PR upstream. (Alternatively I suppose it’s really not much more convenience over a loop that simply executes brew with the rest of the line in the Brewfile when it comes right down to it, and that would handle casks too. So maybe it could just be rewritten that way.)

Include virtualenvwrapper?

If the setup script is pip installing virtualenv, makes sense to install virtualenvwrapper too. Hard to imagine using virtualenv w/o the handy shortcuts and project structure provided by virtualenvwrapper.

Linux issue

I have Linux machine and plan to execute the script just wanted to be sure if it will run ok.

more graceful error handling for rule-file parsing

A rule file that fails to be parsed can produce an error that looks like this:
Configuring Seekret
yaml: unmarshal errors:
line 1: cannot unmarshal !!str Not Found into seekret.ruleYaml

Would be nice to handle failed rule files with a try...catch in such a way that their failure to be parsed did the following:

  1. named the culprit rule file(s)
  2. did not make git-seekrets hard fail
  3. contained a link to where or how to get the most updated/best/fixed rules

seekret-rule Brainstorming

Some Sources of Ideas for Rules:

  • Private SSH key
  • SSH configuration file
  • Potential cryptographic private key
  • Potential cryptographic key bundle
  • Web browser history file
  • Any single-sign-on credential storage file
  • Contains word: backup
  • Contains word: dump
  • Contains word: password
  • Contains word: credential
  • Contains word: secret
  • Contains words: private, key
  • Pidgin OTR private key
  • Shell command history file
  • MySQL client command history file
  • PostgreSQL client command history file
  • Eclipse configuration file
  • JBoss configuration xml
  • PostgreSQL password file
  • Ruby IRB console history file
  • Pidgin chat client account configuration file
  • Hexchat/XChat IRC client server list configuration file
  • Irssi IRC client configuration file
  • Mutt e-mail client configuration file
  • AWS CLI credentials file
  • T command-line Twitter client configuration file
  • OpenVPN client configuration file
  • Shell configuration file
  • Shell profile configuration file
  • Shell command alias configuration file
  • Ruby On Rails secret token configuration file
  • OmniAuth configuration file
  • any files containing KEK or key files for data store access in java
  • Ruby On Rails database schema file
  • Potential Ruby On Rails database configuration file
  • Django configuration file
  • PHP configuration file
  • KeePass password manager database file
  • 1Password password manager database file
  • Apple Keychain database file
  • GNOME Keyring database file
  • Generic system log file
  • Network traffic capture file
  • SQL dump file
  • Jenkins publish over SSH plugin file
  • Potential Jenkins credentials file
  • Apache htpasswd file
  • Configuration file for auto-login process
  • KDE Wallet Manager database file
  • Potential MediaWiki configuration file
  • Tunnelblick VPN configuration file
  • Rubygems credentials file
  • Potential MSBuild publish profile
  • Sequel Pro MySQL database manager bookmark file
  • git-credential-store helper credentials file
  • Git configuration file
  • Chef Knife configuration file
  • Chef private key
  • cPanel backup ProFTPd credentials file
  • Robomongo MongoDB manager configuration file
  • FileZilla FTP configuration or recent servers list
  • Docker configuration file
  • Environment configuration file

NVM_DIR not set in shell by default

after a clean install, I needed to run this in order to proceed with the installation of laptop-seekret:
export NVM_DIR="/Users/username/.nvm"

would be nice to have NVM_DIR set automatically with the initial installation.

Go?

Want to add go to the install? If so, I'll be glad to do a PR.

Look into replacing RVM with chruby and ruby-install

Why: I tried running the script on a clean macOS Sierra image, and ran into issues. I was able to solve them, but I'd prefer to not have to change the Ruby installation each time a new version of RVM or OS X comes out. The script should work on all supported OS X versions.

It looks like some people are now moving to chruby and ruby-install instead of RVM and rbenv.

Can't relicense a derivative work

This is a derivative work of thoughtbot's laptop project, and the README and mac script are primarily copied from the original.

That's totally fine, but we can't take thoughtbot's intellectual property and release it as public domain. The LICENSE and README should include thoughtbot's original copyright license, and then note that subsequent changes we've made are in the public domain.

The Free Software Foundation notes in their FAQ that the improved version, as a whole, should still be considered under its original license. Eventually, the project may veer so far away from the original that that is no longer the case, and the MIT part can be presented as the exception.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.