ifn() {
# insensitive find
find -L . -not \( -name .svn -prune -o -name .git -prune \
- -o -name .hg -prune \) -iname "*$**" 2>/dev/null
+ -o -name .hg -prune -o -name .editor-backups -prune \
+ -o -name .undo-tree-history -prune \) -iname "*$**" 2>/dev/null
}
k() { # history search
- grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | tail -n 40;
+ grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | tail -n 80;
}
apg -m 12 -x 16 -t
}
+pwlong() {
+ # -M CLN = use Caps, Lowercase, Numbers
+ # -n 1 = 1 password
+ # -a 1 = use random instead of pronounceable algorithm
+ apg -m 50 -x 70 -n 1 -a 1 -M CLN
+}
+
q() { # start / launch a program in the backround and redir output to null
"$@" &> /dev/null &
m() { printf "%s\n" "$*"; "$@"; }
+
+vpncmd() {
+ m s nsenter -t $(pgrep -f "/usr/sbin/openvpn --suppress-timestamps --nobind --config /etc/openvpn/client/client.conf") -n -m "$@"
+}
+vpnf() {
+ vpncmd gksudo -u ian firefox &r
+}
vpnbash() {
- m s nsenter -t $(pgrep openvpn) -n -m bash
- # note, if we wanted to run a graphical program,
- # instead of bash, we could use
- # gksudo -u ${SUDO_USER:-$USER} "$@"
+ vpncmd bash
}