April 2010
2 posts
3 tags
Vendor Gems Quickly
Here’s a bash function to vendor gems in your Rails app.
Usage:
vg <gem name> [gem version]
This will install the gem in your ./vendor/gems directory, without installing documentation or dependencies. The version can be specific (i.e. 2.4.3) or minimal (i.e. “>= 2.4”).
Add the following to your ~/.profile:
function vg {
if [ -z "$1" ]; then
echo "Usage: vg [gem...
3 tags
Remove merged branches in git
Here’s a bash function to help you keep your git repository clean.
It removes all branches, local and remote, that have been merged into your current branch. Simply run “rmb” from the command line. Don’t worry - prompt safeguards are in place to show you what you’ll be removing before you commit to deleting anything. And it won’t let you delete...