Duke's utils
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

179 lines
5.0 KiB

function git-spread () {
git push origin $1; git push github $1
}
function dl () {
colordiff -u $1 $2 |less -R
}
function recursive_replace () {
[ -z "$1" ] && echo "Must search for something!" && return
grep -R -l "$1" . | sort | uniq | xargs perl -pi -e "s/$1/$2/"
}
largest () {
du $1 |sort -rn |head
}
mount_iso () {
mdconfig -a -t vnode -f $1 -u 1
mount -t cd9660 /dev/md1 /mnt/iso
}
umount_iso() {
mount -u $1
mdconfig -d -u 1
}
parrot_svn_ps() {
svn ps svn:mime-type 'text/plain' $1
svn ps svn:keywords "Author Date Id Revision" $1
svn ps svn:eol-style native $1
}
parrot_git_svn_ps() {
git svn ps svn:mime-type 'text/plain' $1
git svn ps svn:keywords "Author Date Id Revision" $1
git svn ps svn:eol-style native $1
}
# by Aaron "H-Bomb" Harsh
..to () {
cd `pwd | perl -pe "s[(.*/[^/]*$1[^/]*/).*][\\1/]"`
}
### testing aliases
function bt () {
perl Build.PL &&
./Build test --verbose 1 --test_files $1 |colortest
}
function t () {
./Build test --verbose 1 --test_files $1 |colortest
}
function modversion () {
perl -M$1 -le "print $1->VERSION"
}
function grh () {
git rebase -i head~$1
}
alias tapir="parrot t/harness.pir t/*.t"
alias pg="psql85"
alias pp0="patch -p0"
alias pp1="patch -p1"
alias new_plumage="make realclean; parrot_nqp Configure.nqp; make"
alias test_new_plumage="new_plumage && make test"
alias nqp=~/git/nqp-rx/parrot_install/bin/nqp
alias smolder_parrot="sup && new_parrot && make smolder_test"
alias cg='valgrind --dsymutil=yes --dump-instr=yes --trace-jump=yes'
alias rot13="perl -pe 'y/a-zA-Z/n-za-mN-ZA-M/'"
#alias ls='ls --color=auto'
####### git aliases
alias git=~/bin/git
alias glg="git log --graph --pretty=oneline"
alias grc="git rebase --continue"
alias glp="git log -p"
alias githist="git log -p"
alias gs="git status"
alias undo="git reset HEAD^"
alias gd="git diff --cached -a --diff-filter=ACDTMR"
alias gdc="git diff --diff-filter=ACDTMR"
alias gdh="git diff --diff-filter=ACDTMR HEAD"
alias gca="git commit -a"
alias gsa="git status -a"
alias gco="git checkout"
alias gcom="git checkout master"
alias gcob="git checkout bleed"
alias gpull="git pull"
alias gpush="git push"
alias ga="git add"
alias gc="git clone"
alias gb="git branch"
alias gba="git branch -a"
alias gcb="git checkout -b "
alias gpb="git pull origin bleed"
alias gpm="git pull origin master"
alias gPb="git push origin bleed"
alias gPm="git push origin master"
### bash aliases
#alias prove="prove-5.10"
alias p6topir="~/git/rakudo/perl6 --target=pir"
alias p="perl -d -e0"
alias perl=/usr/local/bin/perl
#alias perldoc=perldoc-5.10
alias perl_list_modules="perl -MCPAN -e 'CPAN::Shell->r'"
alias pdF="perldoc -F"
alias jpg_resize_all='for i in `ls`; do jpg_resize $i; done'
alias wwwmech="perl -MWWW::Mechanize::Shell -eshell"
alias update_minicpan="minicpan -r http://www.cpan.org -l /usr/minicpan"
alias slist="screen -list"
alias cdw="cd ~/work"
alias cdc="cdw;cd current"
alias cdt="cdc;cd trunk"
alias sb="sudo bash"
alias cdw="cd ~/work"
alias dh="df -h"
#alias ls='ls -G'
alias lt="ls -latr"
alias lsd="ls -lad"
alias rf="rm -rf "
alias ll="ls -la"
alias la="ls -a"
alias date="date '+ %A %B %d %X %Y'"
alias tz="tar zxvvpf"
alias lg="ls -al | grep"
alias vi=vim
alias v=vim
alias vb="vim -O ~/.bashrc ~/.bashrc.aliases; source ~/.bashrc"
alias vv="vim ~/.vimrc"
alias tdump="tcpdump -nnXSs 0"
alias screenshot="xwd -display :0 -root > screenshot.dmp"
alias h="history|tail -n 25"
alias hg="history|grep "
alias m=make
alias mj="nice -n20 make -j"
alias l=less
alias sx="ssh -XA"
alias ..='cd ..'
alias 2..='cd $up2'
alias 3..='cd $up3'
alias 4..='cd $up4'
alias 5..='cd $up5'
alias 6..='cd $up6'
alias 7..='cd $up7'
alias 8..='cd $up8'
alias parrotsh="perl ~/svn/parrot/tools/dev/parrot_shell.pl"
alias feather="ssh feather.perl6.nl"
### testing aliases
alias xt="t xt/*"
alias tcover="./Build testcover --verbose 1 |colortest"
alias pb="perl Build.PL"
alias tlikenew="pb && ./Build clean && pb && t"
alias mtlikenew="make clean; perl Makefile.PL && make && make test"
alias clean_build_check="tlikenew && ./Build dist && check_dist"
alias perlconfig="perl -e 'use Config;use Data::Dumper;print Dumper \%Config;'"
####### svn aliases
alias colorsvn=svn
alias sdl="svn diff| colordiff|less -R"
alias sup='colorsvn up'
alias ssa="colorsvn status"
alias ss="svn status |grep -v ^?| grep -v '\.swp$'|grep -v '\.swo$' |grep -v '~$' |grep -v '\._'"
alias ssc="svn status |grep -v '\.swp$' |grep -v '~$' |grep -v '\._' |grep '^C'"
alias sa="colorsvn add"
alias si="colorsvn info"
alias sl="colorsvn log"
alias sco="colorsvn co"
alias svn_newdirs="svn mkdir tags trunk branches"
alias sv=svnversion
alias svn_delete_unknown="svn stat | grep '^?' | sed -e 's/^\? *//' | xargs svn --force del"
alias svn_delete_nonexistent="svn stat | grep '^!' | sed -e 's/^\! *//' | xargs svn --force del"
alias scot_mmr="svn co svn+ssh://leto@leto.net/usr/local/svn/Math-MatrixReal/trunk"
# parrot stuff
alias new_parrot="make realclean; perl Configure.pl --optimize && nice -n20 make -j4"