Permalink
Browse files

First try based on holman/dotfiles

  • Loading branch information...
1 parent 7380197 commit 831ed2828438f2630c49c8cffe1d6982dda1c596 @dflems committed Dec 13, 2012
Showing with 12,974 additions and 3 deletions.
  1. +10 −3 README.md
  2. +58 −0 Rakefile
  3. +2 −0 bin/+x
  4. +9 −0 bin/addr
  5. +1 −0 bin/bitch,
  6. +62 −0 bin/cloudapp
  7. +5 −0 bin/git-amend
  8. +13 −0 bin/git-credit
  9. +8 −0 bin/git-delete-local-merged
  10. +1 −0 bin/git-reup
  11. +5 −0 bin/git-undo
  12. +36 −0 bin/git-up
  13. +364 −0 bin/git-wtf
  14. +33 −0 bin/gitio
  15. +45 −0 bin/gxpr
  16. +8 −0 bin/headers
  17. +31 −0 bin/license
  18. +3 −0 bin/lockme
  19. +17 −0 bin/lsrb
  20. +51 −0 bin/man.cx
  21. +10 −0 bin/orig
  22. +12 −0 bin/ports
  23. +8 −0 bin/search
  24. +1 −0 bin/subl
  25. +19 −0 git/aliases.zsh
  26. +9 −0 git/completion.zsh
  27. +28 −0 git/gitconfig.symlink
  28. +5 −0 git/gitignore.symlink
  29. +2 −0 pg/aliases.zsh
  30. +2 −0 redis/aliases.zsh
  31. +444 −0 redis/redis.conf
  32. +22 −0 ruby/completion.zsh
  33. +7 −0 ruby/gemrc.symlink
  34. +32 −0 ruby/irbrc.symlink
  35. +17 −0 ruby/rbenv.zsh
  36. +13 −0 script/bootstrap
  37. +19 −0 script/homebrew
  38. +10 −0 system/aliases.zsh
  39. +1 −0 system/env.zsh
  40. +5 −0 system/grc.zsh
  41. +2 −0 system/keys.zsh
  42. +3 −0 system/path.zsh
  43. +32 −0 vim/gvimrc.symlink
  44. +2 −0 vim/vim.symlink/.VimballRecord
  45. +10 −0 vim/vim.symlink/after/syntax/html.vim
  46. +4,731 −0 vim/vim.symlink/autoload/rails.vim
  47. +108 −0 vim/vim.symlink/colors/desert.vim
  48. +211 −0 vim/vim.symlink/colors/molokai.vim
  49. +96 −0 vim/vim.symlink/colors/railscasts.vim
  50. +68 −0 vim/vim.symlink/colors/vibrantink.vim
  51. +70 −0 vim/vim.symlink/doc/ack.txt
  52. +695 −0 vim/vim.symlink/doc/command-t.txt
  53. +1,134 −0 vim/vim.symlink/doc/rails.txt
  54. +280 −0 vim/vim.symlink/doc/tags
  55. +2 −0 vim/vim.symlink/filetype.vim
  56. +7 −0 vim/vim.symlink/ftdetect/coffee.vim
  57. +1 −0 vim/vim.symlink/ftdetect/eco.vim
  58. +2 −0 vim/vim.symlink/ftdetect/markdown.vim
  59. +238 −0 vim/vim.symlink/ftplugin/coffee.vim
  60. +322 −0 vim/vim.symlink/indent/coffee.vim
  61. +80 −0 vim/vim.symlink/plugin/ack.vim
  62. +151 −0 vim/vim.symlink/plugin/command-t.vim
  63. +22 −0 vim/vim.symlink/plugin/gitignore.vim
  64. +340 −0 vim/vim.symlink/plugin/rails.vim
  65. +181 −0 vim/vim.symlink/ruby/command-t/Makefile
  66. +289 −0 vim/vim.symlink/ruby/command-t/controller.rb
  67. +24 −0 vim/vim.symlink/ruby/command-t/depend
  68. BIN vim/vim.symlink/ruby/command-t/ext.bundle
  69. +65 −0 vim/vim.symlink/ruby/command-t/ext.c
  70. +36 −0 vim/vim.symlink/ruby/command-t/ext.h
  71. BIN vim/vim.symlink/ruby/command-t/ext.o
  72. +32 −0 vim/vim.symlink/ruby/command-t/extconf.rb
  73. +51 −0 vim/vim.symlink/ruby/command-t/finder.rb
  74. +189 −0 vim/vim.symlink/ruby/command-t/match.c
  75. +29 −0 vim/vim.symlink/ruby/command-t/match.h
  76. BIN vim/vim.symlink/ruby/command-t/match.o
  77. +339 −0 vim/vim.symlink/ruby/command-t/match_window.rb
  78. +164 −0 vim/vim.symlink/ruby/command-t/matcher.c
  79. +30 −0 vim/vim.symlink/ruby/command-t/matcher.h
  80. BIN vim/vim.symlink/ruby/command-t/matcher.o
  81. +10 −0 vim/vim.symlink/ruby/command-t/mkmf.log
  82. +165 −0 vim/vim.symlink/ruby/command-t/prompt.rb
  83. +49 −0 vim/vim.symlink/ruby/command-t/ruby_compat.h
  84. +93 −0 vim/vim.symlink/ruby/command-t/scanner.rb
  85. +75 −0 vim/vim.symlink/ruby/command-t/settings.rb
  86. +46 −0 vim/vim.symlink/ruby/command-t/stub.rb
  87. +43 −0 vim/vim.symlink/ruby/command-t/vim.rb
  88. +32 −0 vim/vim.symlink/ruby/command-t/vim/screen.rb
  89. +38 −0 vim/vim.symlink/ruby/command-t/vim/window.rb
  90. +43 −0 vim/vim.symlink/snippets/markdown.snippets
  91. +237 −0 vim/vim.symlink/syntax/coffee.vim
  92. +60 −0 vim/vim.symlink/syntax/eco.vim
  93. +105 −0 vim/vim.symlink/syntax/markdown.vim
  94. +69 −0 vim/vim.symlink/syntax/mustache.vim
  95. +85 −0 vim/vimrc.symlink
  96. +1 −0 zsh/aliases.zsh
  97. +5 −0 zsh/completion.zsh
  98. +48 −0 zsh/config.zsh
  99. +2 −0 zsh/fpath.zsh
  100. +29 −0 zsh/functions/_boom
  101. +65 −0 zsh/functions/_brew
  102. +2 −0 zsh/functions/_c
  103. +7 −0 zsh/functions/_git-rm
  104. +2 −0 zsh/functions/_h
  105. +8 −0 zsh/functions/_rake
  106. +1 −0 zsh/functions/c
  107. +4 −0 zsh/functions/gf
  108. +1 −0 zsh/functions/h
  109. +1 −0 zsh/functions/last_modified
  110. +26 −0 zsh/functions/newtab
  111. +1 −0 zsh/functions/savepath
  112. +27 −0 zsh/functions/smartextract
  113. +5 −0 zsh/functions/verbose_completion
  114. +83 −0 zsh/prompt.zsh
  115. +19 −0 zsh/window.zsh
  116. +23 −0 zsh/zshrc.symlink
View
@@ -1,4 +1,11 @@
-dotfiles
-========
+## dflems' dotfiles
+Based on [holman](http://github.com/holman)/[dotfiles](http://github.com/holman/dotfiles). Stole a few of his scripts and the neat-o bootstrapping logic. Also stole a buncha cool scripts from [rtomayko](https://github.com/rtomayko)/[dotfiles](https://github.com/rtomayko/dotfiles).
-For posterity.
+## install
+```sh
+git clone https://github.com/dflems/dotfiles.git ~/.dotfiles
+cd ~/.dotfiles
+script/bootstrap
+```
+
+PWOMP!
View
@@ -0,0 +1,58 @@
+require 'rake'
+
+desc "Hook our dotfiles into system-standard positions."
+task :install do
+ linkables = Dir.glob('*/**{.symlink}')
+
+ skip_all = false
+ overwrite_all = false
+ backup_all = false
+
+ linkables.each do |linkable|
+ overwrite = false
+ backup = false
+
+ file = linkable.split('/').last.split('.symlink').last
+ target = "#{ENV["HOME"]}/.#{file}"
+
+ if File.exists?(target) || File.symlink?(target)
+ unless skip_all || overwrite_all || backup_all
+ puts "File already exists: #{target}, what do you want to do? [s]kip, [S]kip all, [o]verwrite, [O]verwrite all, [b]ackup, [B]ackup all"
+ case STDIN.gets.chomp
+ when 'o' then overwrite = true
+ when 'b' then backup = true
+ when 'O' then overwrite_all = true
+ when 'B' then backup_all = true
+ when 'S' then skip_all = true
+ when 's' then next
+ end
+ end
+ FileUtils.rm_rf(target) if overwrite || overwrite_all
+ `mv "$HOME/.#{file}" "$HOME/.#{file}.backup"` if backup || backup_all
+ end
+ `ln -s "$PWD/#{linkable}" "#{target}"`
+ end
+end
+
+task :uninstall do
+
+ Dir.glob('**/*.symlink').each do |linkable|
+
+ file = linkable.split('/').last.split('.symlink').last
+ target = "#{ENV["HOME"]}/.#{file}"
+
+ # Remove all symlinks created during installation
+ if File.symlink?(target)
+ FileUtils.rm(target)
+ end
+
+ # Replace any backups made during installation
+ if File.exists?("#{ENV["HOME"]}/.#{file}.backup")
+ `mv "$HOME/.#{file}.backup" "$HOME/.#{file}"`
+ end
+
+ end
+end
+
+task :default => 'install'
+
View
2 bin/+x
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec chmod +x "$@"
View
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Usage: addr [<if>]
+# Show IPv4 address for interface <if> or all interfaces with
+# no <if> given.
+
+ifconfig -a |
+grep 'inet ' |
+grep broadcast |
+awk '{ print $2 }'
View
View
@@ -0,0 +1,62 @@
+#!/usr/bin/env ruby
+#
+# cloudapp
+# Zach Holman / @holman
+#
+# Uploads a file from the command line to CloudApp, drops it into your
+# clipboard (on a Mac, at least).
+#
+# Example:
+#
+# cloudapp drunk-blake.png
+#
+# This requires Aaron Russell's cloudapp_api gem:
+#
+# gem install cloudapp_api
+#
+# Requires you set your CloudApp credentials in ~/.cloudapp as a simple file of:
+#
+# email
+# password
+
+require 'rubygems'
+
+['json', 'cloudapp_api'].each do |gem|
+ begin
+ require gem
+ rescue LoadError
+ puts "You need to install #{gem}: gem install #{gem}"
+ exit!(1)
+ end
+end
+
+config_file = "#{ENV['HOME']}/.cloudapp"
+unless File.exist?(config_file)
+ puts "You need to type your email and password (one per line) into "+
+ "`~/.cloudapp`"
+ exit!(1)
+end
+
+email,password = File.read(config_file).split("\n")
+
+if ARGV[0].nil?
+ puts "You need to specify a file to upload."
+ exit!(1)
+end
+
+urls = []
+ARGV.each do |x|
+ CloudApp.authenticate(email,password)
+ puts "Attempting to upload #{x}"
+ url = CloudApp::Item.create(:upload, {:file => x}).url
+
+ # Say it for good measure.
+ puts "Uploaded #{x} to #{url}"
+
+ # Get the embed link.
+ url = "#{url}/#{ARGV[0].split('/').last}"
+ urls << url
+end
+
+# Copy it to your (Mac's) clipboard.
+`echo '#{urls.join(',')}' | tr -d "\n" | pbcopy`
View
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+# Use the last commit message and amend your stuffs.
+
+git commit --amend -C HEAD
View
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# A very slightly quicker way to credit an author on the latest commit.
+#
+# $1 - The full name of the author.
+# $2 - The email address of the author.
+#
+# Examples
+#
+# git credit "Zach Holman" zach@example.com
+#
+
+git commit --amend --author "$1 <$2>" -C HEAD
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# Delete all local branches that have been merged into HEAD. Stolen from
+# our favorite @tekkub:
+#
+# https://plus.google.com/115587336092124934674/posts/dXsagsvLakJ
+
+git branch -d `git branch --merged | grep -v '^*' | grep -v 'master' | tr -d '\n'`
View
View
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+# Undo your last commit, but don't throw away your changes
+
+git reset --soft HEAD^
View
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Usage: git-up
+# git-reup
+#
+# Like git-pull but show a short and sexy log of changes
+# immediately after merging (git-up) or rebasing (git-reup).
+#
+# Inspired by Kyle Neath's `git up' alias:
+# http://gist.github.com/249223
+#
+# Stolen from Ryan Tomayko
+# https://github.com/rtomayko/dotfiles/blob/rtomayko/bin/git-up
+
+set -e
+
+PULL_ARGS="$@"
+
+# when invoked as git-reup, run as `git pull --rebase'
+test "$(basename $0)" = "git-reup" &&
+PULL_ARGS="--rebase $PULL_ARGS"
+
+git pull $PULL_ARGS
+
+# show diffstat of all changes if we're pulling with --rebase. not
+# sure why git-pull only does this when merging.
+test "$(basename $0)" = "git-reup" && {
+ echo "Diff:"
+ git --no-pager diff --color --stat HEAD@{1}.. |
+ sed 's/^/ /'
+}
+
+# show an abbreviated commit log of stuff that was just merged.
+echo "Log:"
+git log --color --pretty=oneline --abbrev-commit HEAD@{1}.. |
+sed 's/^/ /'
Oops, something went wrong.

0 comments on commit 831ed28

Please sign in to comment.