Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: matiaskorhonen/dotfiles
base: 642dc87ff8
...
head fork: matiaskorhonen/dotfiles
compare: 995548f8d5
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
54 install.rb
@@ -0,0 +1,54 @@
+#!/usr/bin/env ruby
+
+require "fileutils"
+
+class String
+ def green
+ "\033[32m#{self}\033[0m"
+ end
+
+ def red
+ "\033[31m#{self}\033[0m"
+ end
+
+ def cyan
+ "\033[36m#{self}\033[0m"
+ end
+end
+
+def symlink_unless_target_exists(source, target)
+ exists = (File.file?(target) || File.directory?(target) || File.symlink?(target))
+ if exists
+ puts "Exists: \t".red + "#{target}".cyan
+ else
+ puts "Symlinking: \t".green + "#{target}".cyan + " -> " + target
+ FileUtils.ln_s(source, target)
+ end
+end
+
+DOTFILES = %w(gemrc gitignore irbrc vimrc vim zlogin zshrc)
+HOME = ENV["HOME"]
+ZSH_CUSTOM = Dir["oh-my-zsh/custom/*"]
+
+puts "Home:\t\t" + "#{HOME}".cyan
+puts "Oh My Zsh:\t" + "#{HOME}/.oh-my-zsh".cyan
+
+puts "\n=> Installing dotfiles"
+
+DOTFILES.each do |file|
+ target = File.join(HOME, "." + file)
+ source = File.expand_path(file)
+ symlink_unless_target_exists(source, target)
+end
+
+puts "\n=> Installing custom Oh My Zsh scripts"
+
+ZSH_CUSTOM.each do |file|
+ target = File.join(HOME, "." + file)
+ source = File.expand_path(file)
+ symlink_unless_target_exists(source, target)
+end
+
+puts "\n=> All done now!"
+
+exit 0
View
51 oh-my-zsh/custom/aliases.zsh
@@ -0,0 +1,51 @@
+# brew
+alias bu='brew update && brew install `brew outdated`'
+
+# cd
+alias ..='cd ..'
+
+# ls
+alias ls="ls -F"
+alias l="ls -lAh"
+alias ll="ls -l"
+alias la='ls -A'
+
+# git
+alias gl='git pull'
+alias gp='git push'
+alias gd='git diff'
+alias gc='git commit'
+alias gca='git commit -a'
+alias gco='git checkout'
+alias gb='git branch'
+alias gs='git status'
+alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm"
+alias gx='gitx --all'
+
+# git mistype correction
+alias got='git '
+alias get='git '
+
+# rails
+alias sc='script/console'
+alias ss='script/server'
+alias sg='script/generate'
+alias a='autotest -rails'
+alias tlog='tail -f log/development.log'
+alias scaffold='script/generate nifty_scaffold'
+alias migrate='rake db:migrate db:test:clone'
+alias rst='touch tmp/restart.txt'
+alias r='rails'
+alias pss='passenger start -p 8080'
+
+# Underpants
+alias up='underpants'
+
+# commands starting with % for pasting from web
+alias %=' '
+
+# sshuttle
+alias britunnel='sshuttle -r britannia.kiskolabs.net 0.0.0.0/0'
+
+# redcar
+alias rc='redcar --fork'
View
3  oh-my-zsh/custom/locales.zsh
@@ -0,0 +1,3 @@
+# Make sure that Ruby picks up the correct encoding on start.
+export LC_ALL=en_US.UTF-8
+export LANG=en_US.UTF-8
View
10 oh-my-zsh/custom/plugins/c/c.plugin.zsh
@@ -0,0 +1,10 @@
+function c() {
+ cd ~/Programming/$1;
+}
+
+#compdef c
+function _c () {
+ _files -W ~/Programming -/
+}
+
+compdef _c c

No commit comments for this range

Something went wrong with that request. Please try again.