Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Dotfiles and command-line tools

This repository contains my "dot" files and other command-line tools. While I may have others that I choose to selectively install in a particular environment, the files in this repository form the baseline and are among the first components to be installed setting up a new environment.

Assumptions

I use Mac OS X as my primary development environment, deploying most frequently to virtualized Debian-based Linux server instances. These tools reflect that set-up, so you may need to change things around to suit your particular environment(s).

Pre-requisites

You will definitely need:

  • a compiler (Xcode for OS X, build-essential for Debian)

Optional:

Bootstrapping

You can either manually copy over the files that you find useful, or you can get the whole enchilada in a new environment via one of two bootstrap methods.

The quickest method is to simply copy and paste the following commands into a terminal window.

Mac:

/bin/bash "$(curl -fsSL https://bitbucket.org/j/cmd/raw/tip/etc/bootstrap.sh)"
source ~/tools/etc/link && updatevim

Linux:

wget -qO /tmp/bootstrap.sh https://bitbucket.org/j/cmd/raw/tip/etc/bootstrap.sh && /bin/bash /tmp/bootstrap.sh
source ~/tools/etc/link && updatevim

Slightly more manual method, which requires Mercurial to already be installed:

hg clone https://bitbucket.org/j/cmd ~/tools
./tools/etc/bootstrap.sh
source ~/tools/etc/link && updatevim

The prompt-driven bootstrap script should be idempotent, optionally installing tools such as:

File and directory structure

In an effort to preserve tool isolation, the bootstrap script will install certain third-party components to ~/.local.

I store my versioned command line tools in a folder (~/tools) that in turn contains several sub-folders (bin etc lib) to help keep the files organized. Since I link (etc/link) the dot files to the root of my home folder, I prefer to store them without the prepended dot ("hgignore" rather than ".hgignore"). I add the dot when creating the symlink. So if you use any of those files, make sure you put the dot back.

~/tools/
        bin/
        lib/
        etc/
            vim/

Warning

I change these files frequently, and sometimes I may break things that worked just fine beforehand. If you find something that doesn't operate as optimally as it could, please let me know.

Inspiration

InfiniteRed

Recent activity

j

Commits by j were pushed to j/cmd

6663d7d - Highlight end-of-line whitespace
j

Commits by j were pushed to j/cmd

f22d37e - Update Homebrew installation command
j

Commits by j were pushed to j/cmd

0777325 - Map key to clear search highlighting in vim
j

Commits by j were pushed to j/cmd

1b9df76 - More reliable method for creating vim splits
j

Commits by j were pushed to j/cmd

49f66a1 - Add .gitconfig
j

Commits by j were pushed to j/cmd

98dd2af - Improve bootstrap process. Add hg, git, and tar to bashrc_help.
j

Commits by j were pushed to j/cmd

f0b94a3 - Add git completion, other minor improvements
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.