Skip to content

Commit

Permalink
a bunch of crap
Browse files Browse the repository at this point in the history
  • Loading branch information
jneen committed Oct 14, 2011
1 parent 7a7e43e commit 197b1ab
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 164 deletions.
9 changes: 0 additions & 9 deletions bashrc
@@ -1,12 +1,3 @@
set-ps1-colors() {
# Bash colors!
SET_ERR_COLOR='\[\e[1;3$(($??1:7))m\]'
SET_DIR_COLOR='\[\e[1;34m\]'
SET_PROMPT_COLOR='\[\e[1;32m\]'
CLEAR_COLOR='\[\e[0;38m\]'
PS1="${SET_ERR_COLOR}[${SET_PROMPT_COLOR} \u@\h ${SET_DIR_COLOR}\W ${SET_ERR_COLOR}] \$ ${CLEAR_COLOR}"
}
set-ps1-colors

#vi mode!
set -o vi
Expand Down
1 change: 1 addition & 0 deletions bashrc.d/cabal.sh
@@ -0,0 +1 @@
export PATH="$HOME/.cabal/bin:$PATH"
1 change: 1 addition & 0 deletions bashrc.d/git.sh
@@ -0,0 +1 @@
alias g=git
3 changes: 3 additions & 0 deletions bashrc.d/nave.sh
@@ -0,0 +1,3 @@
#!/bin/bash

alias nave='$HOME/.nave/nave.sh'
21 changes: 0 additions & 21 deletions bashrc.d/nvm.sh
@@ -1,23 +1,2 @@
#!/bin/bash

#mk_nvm_interrupt() {
# local bin="$1"; shift
# alias "$bin"="__nvm_interrupt \"$bin\""
#}
#
#__nvm_interrupt() {
# local bin="$1"; shift
# unalias "$bin"
# __nvm_load_default
# "$bin" "$@"
#}
#
#__nvm_load_default() {
#}
#
#mk_nvm_interrupt nvm
#mk_nvm_interrupt node
#mk_nvm_interrupt uglifyjs
#mk_nvm_interrupt coffee
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh
nvm use v0.4.1
2 changes: 2 additions & 0 deletions bashrc.d/open.sh
@@ -0,0 +1,2 @@
#!/bin/bash
alias open=gnome-open
33 changes: 33 additions & 0 deletions bashrc.d/ps1.sh
@@ -0,0 +1,33 @@
#!/bin/bash
ps1() {
local RED="$(c '1;32')"
local ERR="$(c '1;3$(($??1:7))')"
local DIR="$(c '1;34')"
local PROMPT="$(c '1;32')"
local CLEAR="$(c '0;38')"

echo "$ERR[$PROMPT \u@\h $DIR\W $ERR]\$(ps1::git) \\$ $CLEAR"
}

c() {
echo "\\[\\e[$@m\]"
}

ps1::isgit() {
git symbolic-ref HEAD >/dev/null 2>/dev/null
}

ps1::git() {
local branch="$(git symbolic-ref HEAD 2>/dev/null)"
ps1::isgit || return

[[ -z "$branch" ]] && branch='(detached)'
branch="${branch##refs/heads/}"

local dirty=''
git diff --quiet 2>/dev/null || dirty='*'

echo " -> $dirty$branch"
}

export PS1="$(ps1)"
9 changes: 9 additions & 0 deletions bashrc.d/rake.sh
@@ -0,0 +1,9 @@
#!/bin/bash

rake() {
if which bundle 2>&1 >/dev/null; then
bundle exec rake "$@"
else
$(which rake) "$@"
fi
}
7 changes: 7 additions & 0 deletions bashrc.d/silence.sh
@@ -0,0 +1,7 @@
#!/bin/bash

silence() {
"$@" 2>&1 >/dev/null
}

alias ':s'=silence
6 changes: 3 additions & 3 deletions bashrc.d/src.sh
@@ -1,5 +1,5 @@
#!/bin/bash
export SRC_DIR="${SRC_DIR:-~/src}"
export SRC_DIR="$HOME/src"

src() {
local multiplexer name
Expand All @@ -22,10 +22,10 @@ src() {
fi
done

cd "$SRC_DIR"
cd $SRC_DIR

if [[ -n "$name" ]]; then
dir="$(find "$SRC_DIR" \
dir="$(find $SRC_DIR \
-maxdepth 1 \
-mindepth 1 \
-name "$name*" \
Expand Down
15 changes: 14 additions & 1 deletion gitconfig
Expand Up @@ -5,7 +5,7 @@
name = Jay Adkisson
email = jjmadkisson@gmail.com
[github]
user = jayferd
user = jayferd
token = "ee14fce5546288e00fc0d6dc456fb3ec"
[color]
branch = auto
Expand All @@ -18,8 +18,21 @@
update = checkout

ci = commit -v
c = commit -v

st = status
s = status

br = branch
d = diff

a = add
ap = add -p

ps = push
pl = pull

sh = stash

fancy = log --all --decorate --graph --date=local
fn = log --all --decorate --graph --date=local
Expand Down
3 changes: 3 additions & 0 deletions gitignore
@@ -1,2 +1,5 @@
# vim
.*.sw[a-z]

# rubinius
*.rbc
2 changes: 1 addition & 1 deletion hgrc
Expand Up @@ -5,7 +5,7 @@ hgext.record =
color =
hgshelve = ~/.hg/hgshelve/hgshelve.py
hgstage = ~/.hg/hgstage/hgstage.py
hggit = ~/.hg/hg-git/hggit
# hggit = ~/.hg/hg-git/hggit
rebase =
pager =
purge =
Expand Down
39 changes: 15 additions & 24 deletions irbrc
@@ -1,3 +1,7 @@
if defined?(::Bundler)
$:.concat Dir.glob(File.expand_path('gems/*/lib', ENV['rvm_ruby_global_gems_path']))
end

begin
begin # ANSI codes
module Colors
Expand Down Expand Up @@ -100,31 +104,18 @@ begin

Ripl::Shell.send(:include, JaysCustomFormatter)

def ripl_module(name)
require "ripl/#{name}"
yield if block_given?
rescue LoadError
$stderr.puts "could not find #{name}"
end
Ripl.config[:multi_line_prompt] = ' | '

ripl_module :multi_line do
Ripl.config[:multi_line_prompt] = ' | '
end

ripl_module :auto_indent

ripl_module :color_result do
require 'logger'
require 'awesome_print'
Ripl.config[:color_result_engine] = :ap
Ripl.config[:color_result_ap_options] = {
:index => false,
:indent => 2,
:color => {
:symbol => :purple
}
require 'logger'
require 'awesome_print'
Ripl.config[:color_result_engine] = :ap
Ripl.config[:color_result_ap_options] = {
:index => false,
:indent => 2,
:color => {
:symbol => :purple
}
end
}

end

Expand Down Expand Up @@ -184,7 +175,7 @@ begin
include Comparable
def <=>(other)
self.to_s <=> other.to_s
end
end unless :a.respond_to?(:<=>)
end

class Fixnum
Expand Down
1 change: 1 addition & 0 deletions vim/bundle/vim-markdown
Submodule vim-markdown added at f3f96f
104 changes: 0 additions & 104 deletions vim/syntax/mkd.vim

This file was deleted.

0 comments on commit 197b1ab

Please sign in to comment.