Commit graph

12 commits

Author SHA1 Message Date
Ian C. Anderson
48873f79cb tat command now works in directories with periods
- Running `tat` in the robots.thoughtbot.com directory was throwing a
'bad session name' tmux error
- See http://sourceforge.net/p/tmux/tickets/109/
2014-07-22 20:58:15 -04:00
Dustan Kasten
7c4a093ef6 tat: create tmux session if nonexistent 2014-06-16 10:20:16 -07:00
Dan Croak
64e6dfa4c6 Isolate credits to README
Per @mikeburns' suggestion.
2013-06-18 16:47:01 -07:00
Dan Croak
cb6170d2f8 Extract dev/staging/prod binaries to parity gem
https://github.com/croaky/parity
2013-05-12 17:38:22 -07:00
Gabe Berke-Williams
1f4e6d1370 Use ag instead of ack
https://github.com/ggreer/the_silver_searcher

* ag is faster than ack
* ag searches all files by default (but still ignores gitignored files). This
  removes the need for ack's `--type-add=` options.
* The command is 33% shorter than ack!
2013-03-01 23:28:36 -05:00
Dan Croak
99c8831c94 Add replace script
Find and replace by a given list of files.
2013-02-28 10:24:36 -08:00
Joe Ferris
6603b694b0 Replace s shell script with rspec shell function and alias
* Use a regular alias to make `s` short for `rspec`
* Use an `rspec` shell function to route to zeus when appropriate
* Removes confusion from `s` working differently than `rspec`
* Removes need to use a special alias to get zeus working
2013-01-18 13:24:53 -05:00
Dan Croak
8649403044 Add Heroku scripts
staging:

    staging console
    staging migrate
    staging process
    staging open
    watch staging ps
    staging tail

production:

    production backup
    production console
    production migrate
    production open
    watch production ps
    production tail

load-backup-into:

    load-backup-into staging
    load-backup-into development

Notes on the last command:

* Copy latest production database backup into development database using
  preferred pgbackups + pg_restore method recommended by Heroku.
* Do not assume local development database name.
* Get local database name from config/database.yml.
* This did not previously exist in dotfiles.

Supporting change for these commands:

* Add ~/.bin to the PATH.

https://github.com/thoughtbot/dotfiles/pull/76
2013-01-12 18:06:12 -08:00
Dan Croak
df3dd5129b Attach to tmux session w/ current directory name
I've been experimenting with a workflow where I only run long-running
processes in tmux. Examples:

    zeus start
    foreman start
    rake

tmux (or screen) are good at that: maintaining a long-running process
across shell sessions.

Instead of opening another tmux pane for vim and another for git
commands, Rails generators, test runs, etc., I do all of that outside of
tmux in my normal shell window. Those are all targeted, quick, actions.
They are what I am doing *right now*. It's my workspace.

While experimenting with this process, I noticed, I do jump into tmux
more often. Therefore, I wanted a shorter command for attaching to the
tmux session with the same name as the current directory.
2013-01-08 16:45:28 -08:00
Greg Lazarev
9de82eb791 Pass all parameters to the executable 2012-12-03 09:07:14 -08:00
Dan Croak
80b77cdefc Run specs directly from vim
* Run current spec file.
* Run spec nearest cursor.
* Run last spec that was run.
* Convert s alias to s script, use Zeus if present.
2012-11-19 09:04:34 -08:00
Dan Croak
d8adb07377 Add git-churn script
After you commit a bug fix to a feature branch, find out if the code
you changed to fix the bug is in files that change often:

    git-churn

If the buggy code changes often, find smells and refactor them. Separate
the parts that change often from the parts that don't.

Conversely, avoid refactoring areas with low churn. Refactoring changes
code, and with each change, you risk introducing new bugs.

Example:

     [feature-branch][~/dev/rails-app] churn
     2 app/controllers/accepts_controller.rb
     2 config/database.yml
     4 app/helpers/application_helper.rb
     4 config/application.rb
     9 spec/models/user_spec.rb
     9 spec/spec_helper.rb
    12 spec/requests/dashboard_spec.rb
    13 spec/models/feedback_spec.rb
    19 app/models/feedback.rb
    21 app/models/user.rb
2012-11-15 22:46:10 -08:00