Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
##
# Get the first 7 characters of the SHA1 of the most common ancestor of the given revs
##
BASE_FULL_SHA1=$(git merge-base "$1" "$2");
BASE=$(cut -c 1-7 <<< $BASE_FULL_SHA1);
##
# Get (roughly) the number of commits between the given revs.
# Add one for safety padding so the actual commit in question is included.
##
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
if (Meteor.is_client) {
Template.hello.greeting = function () {
return "Welcome to XYZ.";
};
Template.hello.events = {
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
#! /usr/bin/env bash
#clone the repo
git clone -q "${1}" "clones/${2}"
cd "clones/${2}"
#update the submodules (how do we handle errors here?)
git submodule --quiet update --init --recursive
@mikerpost
mikerpost / mountain-lion-brew-setup.markdown
Created September 14, 2012 04:06 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@mikerpost
mikerpost / Git and SVN command-line prompt
Created August 27, 2012 15:28
his Gist alters the command-line prompt to indicate subversion and git branching. Place this in your .bashrc or .profile file.
parse_svn_revision() {
svn info 2>/dev/null | sed -ne 's#^Last Changed Rev: ##p'
}
parse_svn_branch() {
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -v rev=`echo $(parse_svn_revision)` '{print " [svn::"$1"-r"rev"]" }'
}
parse_svn_url() {
svn info 2>/dev/null | sed -ne 's#^URL: ##p'
}
parse_svn_repository_root() {
@mikerpost
mikerpost / irb3.rb
Created December 25, 2011 06:44 — forked from peterc/irb3.rb
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using RVM
#!/usr/bin/env ruby
# encoding: utf-8
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple
# versions of Ruby at once (using RVM)
#
# By Peter Cooper, BSD licensed
#
# Main dependency is term-ansicolor for each impl:
# rvm exec gem install term-ansicolor