Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial dotfiles commit

  • Loading branch information...
commit 87a1f91c0f50cdcb5084ba289748bbddc4a4e51f 0 parents
@zolrath authored
53 Rakefile
@@ -0,0 +1,53 @@
+# Rakefile
+#
+# Simple tasks for managing my dot files and applications associated them.
+
+FILES_TO_LINK = %w{gitconfig gitignore pryrc rspec secrets tmux.conf tmuxinator zshenv zshrc}
+
+namespace :dot do
+
+ desc 'Create symlinks'
+ task :link do
+ begin
+ FILES_TO_LINK.each do |file|
+ dot_file = File.expand_path("~/.#{file}")
+ if File.exists? dot_file
+ puts "#{dot_file} already exists, skipping link."
+ else
+ File.symlink(".dotfiles/#{file}", dot_file)
+ puts "Created link for #{file} in your home folder."
+ end
+ end
+ rescue NotImplementedError
+ puts "File.symlink not supported, you must do it manually."
+ if RUBY_PLATFORM.downcase =~ /(mingw|win)(32|64)/
+ puts 'Windows 7 use mklink, e.g.'
+ puts ' mklink _vimrc .vim\vimrc'
+ end
+ end
+ end
+
+ desc "Install oh-my-zsh"
+ task :zsh do
+ begin
+ sh %{curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh}
+ sh %{rm ~/.zshrc}
+ rescue
+ puts "Couldn't install oh-my-zsh. Are you connected to the internet?"
+ end
+ end
+
+ desc "Install homebrew"
+ task :brew do
+ begin
+ sh %{/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"}
+ rescue
+ puts "Couldn't install homebrew. Are you connected to the internet?"
+ end
+ end
+
+ desc "Install ZSH, Homebrew, and symlink dotfiles"
+ task :init => ["zsh","brew","link"] do
+ puts "Installed Oh-My-ZSH, Homebrew and linked dotfiles!"
+ end
+end
109 gitconfig
@@ -0,0 +1,109 @@
+[color]
+ ui = true
+[color "branch"]
+ current = yellow reverse
+ local = yellow
+ remote = green
+[color "diff"]
+ meta = yellow bold
+ frag = magenta bold
+ old = red bold
+ new = green bold
+[alias]
+ # add
+ a = add # add
+ chunkyadd = add --patch # stage commits chunk by chunk
+
+ # branch
+ b = branch -v # branch (verbose)
+
+ # commit
+ c = commit -m # commit with message
+ ca = commit -am # commit all with message
+ ci = commit # commit
+ amend = commit --amend # ammend your last commit
+ ammend = commit --amend # ammend your last commit
+
+ # checkout
+ co = checkout # checkout
+ nb = checkout -b # create and switch to a new branch (mnemonic: "git new branch branchname...")
+
+ # cherry-pick
+ cp = cherry-pick -x # grab a change from a branch
+
+ # diff
+ d = diff # diff unstaged changes
+ dc = diff --cached # diff staged changes
+ last = diff HEAD^ # diff last committed change
+
+ # log
+ log = log --decorate --graph --date=short
+ l = log
+ changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
+ short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
+ changelog = log --pretty=format:\" * %s\"
+ shortnocolor = log --pretty=format:\"%h %cr %cn %s\"
+
+ # pull
+ pl = pull # pull
+
+ # push
+ ps = push # push
+
+ # rebase
+ rc = rebase --continue # continue rebase
+ rs = rebase --skip # skip rebase
+
+ # remote
+ r = remote -v # show remotes (verbose)
+
+ # reset
+ unstage = reset HEAD # remove files from index (tracking)
+ uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
+ filelog = log -u # show changes to a file
+ mt = mergetool # fire up the merge tool
+
+ # stash
+ ss = stash # stash changes
+ sl = stash list # list stashes
+ sa = stash apply # apply stash (restore changes)
+ sd = stash drop # drop stashes (destory changes)
+
+ # status
+ s = status # status
+ st = status # status
+ stat = status # status
+
+ # tag
+ t = tag -n # show tags with <n> lines of each tag message
+
+ # svn helpers
+ svnr = svn rebase
+ svnd = svn dcommit
+ svnl = svn log --oneline --show-commit
+[format]
+ pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
+[merge]
+ summary = true
+ verbosity = 1
+[apply]
+ whitespace = nowarn
+[branch]
+ autosetupmerge = true
+[push]
+ # 'git push' will push the current branch to its tracking branch
+ # the usual default is to push all branches
+ default = tracking
+[core]
+ autocrlf = false
+ editor = vim
+[advice]
+ statusHints = false
+[diff]
+ # Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
+ # instead of a/b/c/d as prefixes for patches
+ mnemonicprefix = true
+[rerere]
+ # Remember my merges
+ # http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/
+ enabled = true
32 gitignore
@@ -0,0 +1,32 @@
+# OSX taken from: https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
+# ----------------------------------------------------------------------------------------------
+.DS_Store
+# Thumbnails
+._*
+# Files that might appear on external disk
+.Spotlight-V100
+.Trashes
+
+# Windows taken from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
+# ----------------------------------------------------------------------------------------------
+# Windows image file caches
+Thumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Tags taken from: https://github.com/github/gitignore/blob/master/Global/Tags.gitignore
+# ----------------------------------------------------------------------------------------------
+# Ignore tags created by etags and ctags
+TAGS
+tags
+
+# Vim taken from: https://github.com/github/gitignore/blob/master/Global/vim.gitignore
+# ----------------------------------------------------------------------------------------------
+.*.sw[a-z]
+*.un~
+Session.vim
+
+# SASS
+# ----------------------------------------------------------------------------------------------
+.sass-cache
80 pryrc
@@ -0,0 +1,80 @@
+# === EDITOR ===
+Pry.editor = 'vi'
+
+# === CUSTOM PROMPT ===
+# This prompt shows the ruby version (useful for RVM)
+# Pry.prompt = [proc { |obj, nest_level, _| "#{RUBY_VERSION} (#{obj}):#{nest_level} > " }, proc { |obj, nest_level, _| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " }]
+
+# === Listing config ===
+# Better colors - by default the headings for methods are too
+# similar to method name colors leading to a "soup"
+# These colors are optimized for use with Solarized scheme
+# for your terminal
+Pry.config.ls.heading_color = :magenta
+Pry.config.ls.public_method_color = :green
+Pry.config.ls.protected_method_color = :yellow
+Pry.config.ls.private_method_color = :bright_black
+
+# == PLUGINS ===
+# awesome_print gem: great syntax colorized printing
+# look at ~/.aprc for more settings for awesome_print
+begin
+ require 'awesome_print'
+# # The following line enables awesome_print for all pry output,
+# # and it also enables paging
+# Pry.config.print = proc {|output, value| Pry::Helpers::BaseHelpers.stagger_output("=> #{value.ai}", output)}
+# # If you want awesome_print without automatic pagination, use the line below
+ Pry.config.print = proc { |output, value| output.puts value.ai }
+rescue LoadError => err
+ puts "gem install awesome_print # <-- highly recommended"
+ end
+
+# === CUSTOM COMMANDS ===
+# from: https://gist.github.com/1297510
+default_command_set = Pry::CommandSet.new do
+ command "copy", "Copy argument to the clip-board" do |str|
+ IO.popen('pbcopy', 'w') { |f| f << str.to_s }
+ end
+
+ command "clear" do
+ system 'clear'
+ if ENV['RAILS_ENV']
+ output.puts "Rails Environment: " + ENV['RAILS_ENV']
+ end
+ end
+
+ command "sql", "Send sql over AR." do |query|
+ if ENV['RAILS_ENV'] || defined?(Rails)
+ pp ActiveRecord::Base.connection.select_all(query)
+ else
+ pp "No rails env defined"
+ end
+ end
+ command "caller_method" do |depth|
+ depth = depth.to_i || 1
+ if /^(.+?):(\d+)(?::in `(.*)')?/ =~ caller(depth+1).first
+ file = Regexp.last_match[1]
+ line = Regexp.last_match[2].to_i
+ method = Regexp.last_match[3]
+ output.puts [file, line, method]
+ end
+ end
+end
+
+Pry.config.commands.import default_command_set
+
+
+# === CONVENIENCE METHODS ===
+# Stolen from https://gist.github.com/807492
+# Use Array.toy or Hash.toy to get an array or hash to play with
+class Array
+ def self.toy(n=10, &block)
+ block_given? ? Array.new(n,&block) : Array.new(n) {|i| i+1}
+ end
+end
+
+class Hash
+ def self.toy(n=10)
+ Hash[Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr})]
+ end
+end
2  rspec
@@ -0,0 +1,2 @@
+--format nested
+--color
6 secrets
@@ -0,0 +1,6 @@
+export GIT_AUTHOR_NAME='name'
+export GIT_AUTHOR_EMAIL='email'
+export GIT_COMMITTER_NAME='name'
+export GIT_COMMITTER_EMAIL='email'
+export GITHUB_USER='username'
+export GITHUB_TOKEN='token'
49 tmux.conf
@@ -0,0 +1,49 @@
+# Make pasteboard in OS X work.
+set -g default-command "reattach-to-user-namespace -l zsh"
+
+# Make it use C-a, similar to screen.
+unbind C-b
+# C-a C-a to go to last window.
+unbind l
+set -g prefix C-a
+bind-key C-a last-window
+# Make window numbers start at 1 instead of 0.
+set -g base-index 1
+setw -g aggressive-resize on
+# Mouse can be used to select/resize windows and panes.
+set -g mode-mouse on
+set -g mouse-select-pane on
+set -g mouse-select-window on
+set -g mouse-utf8 on
+
+# Turn off automatic window renaming to keep tmuxinator titles.
+setw -g automatic-rename off
+
+# Change splitting windows to easier to remember _ and |
+unbind % # Remove default binding since we’re replacing
+bind | split-window -h
+bind _ split-window -v
+
+# Zoom in one current pane.
+unbind +
+bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
+unbind -
+bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
+
+# Reload key
+bind r source-file ~/.tmux.conf
+
+set -g history-limit 1000
+
+# Set window notifications
+setw -g monitor-activity on
+set -g visual-activity on
+
+# THEME
+set -g status-bg black
+set -g status-fg white
+set -g status-interval 60
+set -g status-left-length 30
+set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
+set -g status-right '#[fg=yellow]#(cut -d -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]'
+set-window-option -g window-status-current-bg blue
24 tmuxinator/default.yml
@@ -0,0 +1,24 @@
+# ~/.tmuxinator/projectname.yml
+# you can make as many tabs as you wish...
+
+project_name: projectname
+project_root: ~/Code/projectname
+# rvm: ruby-1.9.3-p125-perf@projectname
+# pre: sudo /etc/rc.d/mysqld start
+tabs:
+ - editor:
+ layout: main-vertical
+ panes:
+ - vim
+ - tork
+ - git pull
+ - shell:
+ # - rails:
+ # layout: even-vertical
+ # panes:
+ # - rails db
+ # - rails c
+ # - rails s
+ # - logs: tail -f log/development.log
+ # - capistrano:
+ # - server: ssh me@myhost
4 zshenv
@@ -0,0 +1,4 @@
+# ------------------------------------------------------------------------------
+# for rvm
+# ------------------------------------------------------------------------------
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
40 zshrc
@@ -0,0 +1,40 @@
+# Path to your oh-my-zsh configuration.
+ZSH=$HOME/.oh-my-zsh
+
+# Set name of the theme to load.
+# Look in ~/.oh-my-zsh/themes/
+# If you set this to "random", it'll load a random theme when oh-my-zsh is run.
+ZSH_THEME="soliah"
+
+# Aliases
+# alias zshconfig="mate ~/.zshrc"
+alias emacs="emacs -nw"
+
+# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
+# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
+# Example format: plugins=(rails git textmate ruby lighthouse)
+plugins=( brew bundler extract furd gem git git-flow github heroku\
+ lein osx rails3 ruby rvm vagrant)
+
+# Set to this to use case-sensitive completion # CASE_SENSITIVE="true"
+# Comment this out to disable weekly auto-update checks # DISABLE_AUTO_UPDATE="true"
+# Uncomment following line if you want to disable colors in ls # DISABLE_LS_COLORS="true"
+# Uncomment following line if you want to disable autosetting terminal title.
+DISABLE_AUTO_TITLE="true"
+# Uncomment following line if you want red dots to be displayed while waiting for completion # COMPLETION_WAITING_DOTS="true"
+
+source $ZSH/oh-my-zsh.sh
+
+# Set variables for Rails to use more memory but run more quickly
+export RUBY_HEAP_MIN_SLOTS=1000000
+export RUBY_HEAP_SLOTS_INCREMENT=1000000
+export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
+export RUBY_GC_MALLOC_LIMIT=1000000000
+export RUBY_HEAP_FREE_MIN=500000
+# Customize to your needs...
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
+[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator # Load Tmuxinator
+export EDITOR='vim'
+export PATH=$HOME/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin:/Users/furd/Code/clojurescript/bin
+rvm use default
+source ~/.secrets
Please sign in to comment.
Something went wrong with that request. Please try again.