Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README.textile | ||
| |
add_key | Mon Jan 12 08:04:36 -0800 2009 | |
| |
dbyml | ||
| |
gen-autocomplete.sh | Tue Jan 20 17:54:48 -0800 2009 | |
| |
git-ownership.awk | Sat Mar 07 19:30:21 -0800 2009 | |
| |
git-stats | Sat Mar 07 19:30:21 -0800 2009 | |
| |
lncur | ||
| |
psgrep | Sun Dec 28 14:47:17 -0800 2008 | |
| |
rgrep | Fri Mar 06 20:22:31 -0800 2009 | |
| |
svn.rake | Tue Jan 20 17:57:30 -0800 2009 | |
| |
svnadd | Tue Jan 20 17:57:31 -0800 2009 | |
| |
touchx | Fri Mar 06 20:22:31 -0800 2009 |
John’s Toolbox
This is simply a repository of (what I hope are) portable shell scripts I find myself using at varying degrees of frequency. I find that often you can make the best productivity gains a step below your actual programming language, more specifically within
the shell itself.
add_key
A simple prompt-driven script to upload your public key to a remote server. Allows us to accomplish this by only entering our password once.
$>add_key myuser@remote_server /path/to/keyfile
gen-autocomplete.sh
Extremely helpful script for caching bash autocompletion for ruby on rails related commands. More explicit details in the script itself. Commands to be added to your .profile scripts are described in the comments.
rgrep
A wrapper for grep that caters to recursive searches through a rails project. It omits all .svn directories and .log files from it’s search tree. Also colorizes output, and includes the line number. Other grep options can be passed just as normal.
$>rgrep -B5 "def some_function" app/*
psgrep
Simply a wrapper for ps aux | grep ____. I do this all of the time.
$>psgrep ruby
touchx
Create an executable file.
git-stats
From within a git repository, output total and percentage responsibility for insertions, deletions, files and commits broken down by author. This script is adapted from a blog post by Paul Ostazeski called Calculating authorship with git and awk. A sample output can be seen below (run against this repository 3/7/09 at about 10:27PM EST).
john-mbp:johns-toolbox john$ ./git-stats Adam: insertions: 212 (73%) deletions: 4 (15%) files: 5 (31%) commits: 4 (40%) John: insertions: 79 (27%) deletions: 22 (85%) files: 11 (69%) commits: 6 (60%)
svn.rake
Tasks to help with svn in Ruby on Rails projects, including adding all uncommitted files, interactive svn:ignore specification, and full-blown svn/story-helper workflow task (to be run just before committing).
svnadd
Shell script to add all ? files in a subversion checkout. Extremely useful when you keep your svn:ignore settings up to date.
lncur
Little helper to change a ‘current’ symlink in the project root when you have
checked out multiple branches as siblings.








