Skip to content

Instantly share code, notes, and snippets.

@kekssw
kekssw / git-transplant.sh
Last active August 29, 2015 14:10
git-transplant
#!/bin/bash
if [ "$#" -lt 2 ]
then
cat << EOM
Usage: git-transplant <FROM> <TO> <UPSTREAM>
Transplants <FROM> .. <TO> commit range (inclusive) on top of <UPSTREAM>.
If <FROM> is a number, transplant that number of commits ending at <TO> instead
#!/bin/bash
set -eu
shopt -s nullglob
readonly base_dir=/var/lib/docker/registry
readonly output_dir=$(mktemp -d -t trace-images-XXXX)
readonly jq=/usr/bin/jq
readonly repository_dir=$base_dir/repositories
@JennDudley
JennDudley / rails_github_heroku.md
Created April 25, 2012 20:56
Steps to set up a new Rails app, initialize a git repo, push to Github and deploy to Heroku

This is a list of steps to:

  • Setup a new Rails app
  • Initialize a local repository using git
  • Create a new remote repository using GitHub
  • Change README.rdoc
  • Deploy to a cloud service - Heroku

Assumptions:

  • Ruby is installed (v 1.9.3)
  • Rails is installed (v 3.2.3)