Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweaks from the last few weeks/months. `all` is pretty cool. "all cab…

…al clean configure build"
  • Loading branch information...
commit fbe2cd82634587200617646c3762e36c23020f9f 1 parent c813803
@nkpart authored
View
8 ackrc
@@ -4,4 +4,10 @@
--type-set=hamlet=.hamlet
--type-set=haml=.haml
--type-set=erb=.erb
-
+--type-add=ruby=.rake
+--type-set=cucumber=.feature
+--ignore-dir=.bundle
+--type-set=config=.conf
+--ignore-dir=cabal-dev
+--ignore-dir=coverage
+--type-set=coffee=.coffee
View
41 aliases.sh
@@ -14,7 +14,7 @@ alias h='hoogle -n 20 --colour'
# useful command to find what you should be aliasing:
alias profileme="history | awk '{print \$2}' | awk 'BEGIN{FS=\"|\"}{print \$1}' | sort | uniq -c | sort -n | tail -n 20 | sort -nr"
-alias r='rake'
+alias r='bin/rake'
alias sql="echo SQL for Nick
echo ----
@@ -33,11 +33,10 @@ alias gaa='git add -A'
alias gc='git commit -v'
alias gb='git branch'
alias gba='git branch -a'
-alias gco='git checkout'
-alias gfo='git fetch origin'
alias gdi='git diff --staged'
alias gd='git diff'
alias gsp='git smart-pull' # From the git-smart gem, $ gem install git-smart
+alias gdc='git diff --staged && git commit'
alias days="git log --since='2 month ago' --author=nkpart | grep Date | awk '{print \$2, \$3, \$4}' | uniq"
alias my_work="git log --since='2 month ago' --date=short --author=nkpart --pretty=format:\"%ad\" | uniq"
@@ -45,8 +44,11 @@ alias my_work="git log --since='2 month ago' --date=short --author=nkpart --pret
alias ox="open *.xcodeproj || open iPhone/*.xcodeproj || open iPadPrototype/*.xcodeproj"
alias ea='vim ~/.aliases.sh && source ~/.aliases.sh'
+alias other_job='jobs | grep - | cut -f 1 -d ] | cut -f 2 -d ['
+alias s='fg `other_job`'
+
function go () {
- PROJECT_DIRS="$HOME/p/mogen/projects $HOME/p/mogen/projects/oomph-build/mags $HOME/railscamp $HOME/p/mogen/kits $HOME/p"
+ PROJECT_DIRS="$HOME/p $HOME/p/mogen/projects $HOME/p/mogen/kits"
TEST1=`find $PROJECT_DIRS -maxdepth 1 | grep \/$1 | head -n 1`
TEST2=`find $PROJECT_DIRS -maxdepth 1 | grep \/[^\/]*$1[^\/]* | head -n 1`
if [ ! -n $TEST1 ]
@@ -80,12 +82,37 @@ alias sc=script/console
alias sg=script/generate
alias sd=script/destroy
alias ss=script/server
+
+alias nginx_restart="sudo /opt/nginx/sbin/nginx -s stop && sudo /opt/nginx/sbin/nginx"
+alias test_logs="find . -name test.log | xargs du -sh"
alias hdocs="open ~/Library/Haskell/doc/index.html"
-alias gok='pushd ~/.kit && git pull && popd'
-alias goku='gok && git pull && kit update'
-
# Tmuxing
alias tmux="TERM=screen-256color-bce tmux"
+function ghc-pkg-supercleaner() {
+ b="0"
+ for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
+ do
+ echo unregistering $p; ghc-pkg $* unregister $p;
+ cabal install $p; b="1"
+ done
+ if [ $b == "1" ];
+ then ghc-pkg-supercleaner
+ fi
+}
+
+function all() {
+ prog=$1
+ shift
+ while [ $1 ]; do
+ $prog $1
+ if [ $? -ne 0 ]; then
+ break;
+ fi
+ shift
+ done
+}
+
+alias dbgo='rake db:migrate db:structure:dump db:test:prepare --trace'
View
2  bash_profile
@@ -21,3 +21,5 @@ source ~/.aliases.sh
if [ -f ~/.work_aliases.sh ]; then
source ~/.work_aliases.sh
fi
+
+[[ -s "/Users/nkpart/.rvm/scripts/rvm" ]] && source "/Users/nkpart/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
View
1  bashrc
@@ -3,6 +3,7 @@ export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PATH=~/bin:$PATH
export PATH=~/Library/Haskell/bin:$PATH
export PATH=~/.gem/ruby/1.8/bin:$PATH
+export PATH=./bin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
smiley_status() {
View
12 gitconfig
@@ -15,7 +15,7 @@
r = !git l -20
ra = !git r --all
[format]
- pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset
+ pretty=format:%C(yellow)%h%Creset%C(bold blue)%d%Creset %s %C(bold white)/ %Creset%C(cyan)%an, %ar %Creset
[apply]
whitespace = nowarn
[color]
@@ -24,10 +24,18 @@
status = auto
ui = auto
[core]
- excludesfile = ~/.gitignore
+ excludesfile = /Users/nkpart/.gitignore_global
whitespace = fix
[default]
push = tracking
pull = tracking
[diff]
tool = vimdiff
+[difftool "sourcetree"]
+ cmd = opendiff \"$LOCAL\" \"$REMOTE\"
+ path =
+[mergetool "sourcetree"]
+ cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
+ trustExitCode = true
+[heroku]
+ account = personal
View
93 irbrc
@@ -1,93 +0,0 @@
-# require 'rubygems'
-# require 'wirble'
-#
-# Wirble.init(:history_size => 10000)
-# Wirble.colorize
-#
-# Wirble::Colorize.colors = {
-# # delimiter colors
-# :comma => :white,
-# :refers => :white,
-#
-# # container colors (hash and array)
-# :open_hash => :white,
-# :close_hash => :white,
-# :open_array => :white,
-# :close_array => :white,
-#
-# # object colors
-# :open_object => :light_red,
-# :object_class => :red,
-# :object_addr_prefix => :blue,
-# :object_line_prefix => :blue,
-# :close_object => :light_red,
-#
-# # symbol colors
-# :symbol => :blue,
-# :symbol_prefix => :blue,
-#
-# # string colors
-# :open_string => :light_green,
-# :string => :light_green,
-# :close_string => :light_green,
-#
-# # misc colors
-# :number => :light_blue,
-# :keyword => :orange,
-# :class => :red,
-# :range => :light_blue,
-# }
-#
-# class Object
-# # Return a list of methods defined locally for a particular object. Useful
-# # for seeing what it does whilst losing all the guff that's implemented
-# # by its parents (eg Object).
-# def local_methods(obj = self)
-# (obj.methods - obj.class.superclass.instance_methods).sort
-# end
-# end
-#
-
-
-class Symbol
- def ^ other
- fixed = Readline::HISTORY.entries[-2].sub(self.to_s, other.to_s)
- begin
- puts "> #{fixed}"
- eval fixed
- ensure
- Readline::HISTORY.pop
- Readline::HISTORY << fixed
- end
- end
-end
-
-require 'pp'
-
-require 'rubygems'
-require 'hirb'
-require 'wirble'
-
-Wirble.init
-Wirble.colorize
-Hirb::View.enable
-
-if rails_env = ENV['RAILS_ENV']
- rails_root = File.basename(Dir.pwd)
- IRB.conf[:PROMPT] ||= {}
- IRB.conf[:PROMPT][:RAILS] = {
- :PROMPT_I => "#{rails_root}> ",
- :PROMPT_S => "#{rails_root}* ",
- :PROMPT_C => "#{rails_root}? ",
- :RETURN => "=> %s\n"
- }
- IRB.conf[:PROMPT_MODE] = :RAILS
- IRB.conf[:IRB_RC] = Proc.new do
- begin
- ActiveRecord::Base.logger = Logger.new(STDOUT)
- rescue
- puts "No ActiveRecord for this project."
- end
- end
-end
-
View
5 tmux.conf
@@ -2,11 +2,12 @@ set -g default-terminal "screen-256color"
set -g mode-mouse on
unbind C-b
set -g prefix ^A
-bind a send-prefix
+bind-key a send-prefix
bind-key C-a last-window
+set -g base-index 1
set-option -g default-command "reattach-to-user-namespace -l bash"
unbind % # Remove default binding since we’re replacing
-bind | split-window -h
+bind \ split-window -h
bind - split-window -v
Please sign in to comment.
Something went wrong with that request. Please try again.