Skip to content

Instantly share code, notes, and snippets.

[user]
name = Your Name
#forces git to ask me my email for each repository I check out. Useful when working on multiple clients
email = (none)
[color]
ui = auto
[alias]
amend = commit --amend -C HEAD
@rcaval
rcaval / keybase.md
Created August 25, 2017 19:25
keybase.md

Keybase proof

I hereby claim:

  • I am rcaval on github.
  • I am rcaval (https://keybase.io/rcaval) on keybase.
  • I have a public key ASBCJfB_jl0wonmDQ9nZwh0aYk1Z5vKVrynAXFFlSpY85wo

To claim this, I am signing this object:

@rcaval
rcaval / archive.sh
Last active February 23, 2017 09:57 — forked from jwalton/archive.sh
#!/usr/bin/env bash
# Adapted from http://scottwb.com/blog/2012/07/14/merge-git-repositories-and-preseve-commit-history/
#
# This is a script for archiving old private repos into an `attic` repo. To use, fill in the `ACCOUNT`
# variable below, then add this script to your "attic" repo, then just `./archive.sh <repo name> <repo url>` from
# your cloned attic repo. This will take the contents of "reponame" and copy them into a subdirectory in
# attic named "reponame", preserving history. Note that the original repo is not modified in any way
# (we clone it to /tmp/reponame and don't push anything) and this script doesn't auto-push your attic
# repo, so if it all goes horribly wrong, it's very easy to recover.
@rcaval
rcaval / commit-msg
Last active November 10, 2015 18:51
Git hooks to validate Commit Message
#!/bin/sh
grep -q -e "c[0-9]\+ [/a-z]\+: .*" $1 || {
echo >&2 Commit message should be formatted as \"cXXX login1/login2: message\"
exit 1
}
@rcaval
rcaval / Brewfile
Last active December 15, 2016 18:42
Brew Bundle file
# comment
tap 'homebrew/dupes'
## Install Cask
brew 'brew-cask'
brew 'caskroom/cask/brew-cask'
#jvm tools
brew 'jenv'
brew 'gradle'
@rcaval
rcaval / pdf-concat
Created September 4, 2014 01:10
Concatenate pdf files in mac
cd /usr/local/bin
sudo ln "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" pdfconcat
#usage
#pdfconcat -o PATH/TO/YOUR/MERGED/FILE.pdf /PATH/TO/ORIGINAL/1.pdf /PATH/TO/ANOTHER/2.pdf /PATH/TO/A/WHOLE/DIR/*.pdf
@rcaval
rcaval / new_machine.sh
Last active August 29, 2015 14:00
Startup a new machine
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
curl -s http://getmacapps.com/raw/w1xeeml62o1 | sh
brew install wget tree git
brew install zsh zsh-completion
# curl -o font.zip http://www.marksimonson.com/assets/content/fonts/AnonymousPro-1.002.zip; unzip -u font.zip *.ttf -d /Library/Fonts; rm font.zip
#git extras
(cd /tmp && git clone --depth 1 https://github.com/visionmedia/git-extras.git && cd git-extras && sudo make install)