Skip to content

Commit

Permalink
shell voodo: assorted updates
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Mar 16, 2014
1 parent ecd64dd commit 1f6adb6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
1 change: 0 additions & 1 deletion .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias abuild='sudo sh -c "extra-x86_64-build && extra-i686-build"'
alias callgrind='valgrind --tool=callgrind'
alias clearflags='unset CFLAGS CPPFLAGS LDFLAGS'
alias cdg='up .git'
Expand Down
3 changes: 3 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export HISTCONTROL="ignoreboth:erasedups"
export HISTSIZE=1000
export HISTFILESIZE=2000

GIT_EXEC_PATH=/usr/lib/git:/usr/share/git/remote-helpers

source_bash_completion() {
local f
[[ $BASH_COMPLETION ]] && return 0
Expand Down Expand Up @@ -67,3 +69,4 @@ if type -p keychain >/dev/null && (( UID != 0 )); then
eval $(keychain --eval "${keys[@]#$HOME/.ssh/}")
unset keys
fi

26 changes: 22 additions & 4 deletions .functions
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

abuild() {
local repo=${1:-extra}
sudo sh -c "'$repo-x86_64-build' && '$repo-i686-build'"
}

calc() {
echo "scale=3; $*" | bc
}
Expand All @@ -25,9 +30,6 @@ confpac() {
--enable-warningflags \
--enable-debug \
"$@"
for path in lib/libalpm src/{pacman,util}; do
ln -sf ../../config.h $path/config.h
done
}

pushd() {
Expand Down Expand Up @@ -83,7 +85,7 @@ deps() {
:
else
# maybe its a lib?
[[ -f /usr/lib/$1 ]] && bin=$dir/$1
[[ -f /usr/lib/$1 ]] && bin=/usr/lib/$1
fi

if [[ $bin && $1 != "$bin" ]]; then
Expand Down Expand Up @@ -255,6 +257,10 @@ rlatest() {
}
}

signall() {
for _; do gpg --detach-sign "$_"; done
}

sdstat() {
systemctl status "$@"
}
Expand All @@ -267,6 +273,18 @@ t() {
tmux -L main "${@:-attach}"
}

traffic() {
ss -t '( not dst localhost )' | awk '
NR > 1 {
sub(/:[^:]+$/, "", $NF)
a[$NF]++
}
END {
for (h in a)
printf "%s\t%d\n", h, a[h]
}'
}

up() {
local cdinto=0 x= traverse= curpath=

Expand Down
4 changes: 2 additions & 2 deletions .profile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export PAGER=less
PATH=$HOME/bin:$PATH
export CDPATH=.:/mnt/Gluttony:/mnt/Haven

[ -f ~/.profile."$HOSTNAME" ] && . ~/.profile."$HOSTNAME"
[ -n $BASH -a -r ~/.bashrc ] && . ~/.bashrc
[ -f "$HOME/.profile.$HOSTNAME" ] && . ~/.profile."$HOSTNAME"
[ -n "$BASH" ] && [ -r "$HOME/.bashrc" ] && . ~/.bashrc

0 comments on commit 1f6adb6

Please sign in to comment.