Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Firebaugh committed Oct 14, 2010
0 parents commit 6caaf51
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 0 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2009 Ryan Bates

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
50 changes: 50 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
require 'rake'
require 'erb'

desc "install the dot files into user's home directory"
task :install do
replace_all = false
Dir['*'].each do |file|
next if %w[Rakefile README.rdoc LICENSE].include? file

if File.exist?(File.join(ENV['HOME'], ".#{file.sub('.erb', '')}"))
if File.identical? file, File.join(ENV['HOME'], ".#{file.sub('.erb', '')}")
puts "identical ~/.#{file.sub('.erb', '')}"
elsif replace_all
replace_file(file)
else
print "overwrite ~/.#{file.sub('.erb', '')}? [ynaq] "
case $stdin.gets.chomp
when 'a'
replace_all = true
replace_file(file)
when 'y'
replace_file(file)
when 'q'
exit
else
puts "skipping ~/.#{file.sub('.erb', '')}"
end
end
else
link_file(file)
end
end
end

def replace_file(file)
system %Q{rm -rf "$HOME/.#{file.sub('.erb', '')}"}
link_file(file)
end

def link_file(file)
if file =~ /.erb$/
puts "generating ~/.#{file.sub('.erb', '')}"
File.open(File.join(ENV['HOME'], ".#{file.sub('.erb', '')}"), 'w') do |new_file|
new_file.write ERB.new(File.read(file)).result(binding)
end
else
puts "linking ~/.#{file}"
system %Q{ln -s "$PWD/#{file}" "$HOME/.#{file}"}
end
end
14 changes: 14 additions & 0 deletions bash_profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export JAVA_HOME=$(/usr/libexec/java_home)
export JAVA_OPTS="-d32"

export PATH=~/Library/Scripts:$PATH
export EDITOR="mate -w"

alias ll='ls -la'

# bash-completion
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi

source ~/.bashrc
1 change: 1 addition & 0 deletions bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
7 changes: 7 additions & 0 deletions gemrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
:verbose: true
gem: --no-ri --no-rdoc
:update_sources: true
:backtrace: false
:bulk_threshold: 1000
:benchmark: false
4 changes: 4 additions & 0 deletions gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
.yardoc
.orig
.DS_Store
22 changes: 22 additions & 0 deletions irbrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'rubygems'
require 'irb/completion'
require 'pp'

begin
require 'map_by_method'
rescue LoadError
end

begin
require 'what_methods'
rescue LoadError
end

begin
require 'wirble'
Wirble.init
Wirble.colorize
rescue LoadError
end

IRB.conf[:AUTO_INDENT]=true
1 change: 1 addition & 0 deletions rvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rvm_gemset_create_on_use_flag=1

0 comments on commit 6caaf51

Please sign in to comment.