Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w ~/.bashrc
- (...)
- source ~/.bash_alias
- alias| awk 'BEGIN {FS=" |=";C=0;printf "Goodies so far: "} {C++ % 5 ? LOL=" " : LOL="\n" ; printf $2 LOL} END {printf "\n"}'
- treść ~/.bash_alias (wybrane fragmenty)
- purlenc() { #urlencode_xD
- perl -MURI::Escape -e 'print uri_escape(chop <STDIN>);'
- }
- alias nowdate='date +%Y%m%d' #today in YYYMMDD
- alias nowtime='date +%H%M%S' #now in HHMMSS+
- ## git shit
- alias gs='git status' #shorthand for git status
- alias gl='git log' #shorthand for git log
- alias ga='git add' #shorthand for git add
- alias gc='git commit -m' #shorthand for git commit -m (expects comment)
- alias via='vi ~/.bash_alias;. ~/.bash_alias' #edits aliases
- alias vi3='vi ~/.config/i3/config' #edits i3config
- alias togif='__togif' #giphyfies file
- __togif() { ffmpeg -i $@ -movflags faststart -pix_fmt yuv420p [email protected] ;}
- alias region_delay='xfce4-screenshooter -r -d 3 -m' #captures screenshot of selected region after 3 secs delay
- alias qr='__qr' #generates QRcode from arbitrary string and displays it
- __qr() { data="$1"; qrencode -s12 -o /tmp/qr.png "$data"; display /tmp/qr.png ;}
- alias space2line='echo reading,^D 2 end;stty -echo;while read p;do echo -ne $p\ ;done;echo;stty echo' #clumsy thingie to space separate newline separated input, end with ^D
- alias ts2date="awk 'BEGIN { print strftime(\"%c\",ARGV[1]);}'" #changes UNIX timestamp to date
- alias sshpassword='_shp'; #force ssh with password authentication, despite having exchanged pubkey
- _shp() {
- ssh -o PreferredAuthentications=password $@
- }
- alias sshkeyonly='_shk'; #force ssh with password authentication, despite having exchanged pubkey
- _shk() {
- ssh -o PreferredAuthentications=publickey $@
- }
- __unfuck() {
- echo "link?"
- read p
- curl -v "$p" 2>&1|grep Location |rev|cut -d' ' -f1 |rev
- }
- alias unfuck='__unfuck' #unfucks 301 links
- alias goodies="__usage" #goodies so far
- __usage () { awk 'BEGIN {FS="[ =]";print "Goodies so far:"} /^alias/ {COMMENT=substr($0,match($0,"#[a-zA-Z] ?.*$")+1);printf"\033[1;31m%-20s\033[0m%s\n",$2,COMMENT }' ~/.bash_alias ;}
Advertisement
Add Comment
Please, Sign In to add comment