This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
/
.aliases
66 lines (48 loc) · 2.18 KB
/
.aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
##########################
##### Common aliases #####
##########################
alias sudo='sudo ' # the space tells it respect aliases from this file
# Color outputs
alias grep='grep --color=always'
alias fgrep='fgrep --color=always'
alias tmux='tmux -2'
if [[ $(uname) == 'Darwin' ]]; then
alias ls='ls -AhFG'
elif [[ $(uname) == 'Linux' ]]; then
alias ls='ls -AFh --color'
else # Cygwin on Windows
alias ls='ls -AhG --color'
fi
alias findgrep='find . | xargs grep'
alias lst='date;ls -lt | head'
alias spacerm="find -name '* *' -type f | rename 's/ /_/g'"
alias htopm='htop --sort-key PERCENT_MEM'
alias htopc='htop --sort-key PERCENT_CPU'
alias git-status-all='find . -type d -name ".git" | while read dir ; do sh -c "cd $dir/../ && echo \"GIT STATUS IN ${dir//\.git/}\" && git status -s" ; done'
alias cdg='cd $(git rev-parse --show-toplevel)'
alias diff='diff -y'
alias R='R --quiet'
alias emacs='emacs -nw'
alias install_R_deps='bash ~/.bash-scripts/install_R_deps.sh'
alias tree="tree -C"
alias ytdl='yt-dlp -f "bestvideo[height<=1080]+bestaudio/best" --write-auto-sub --sub-format srt/best --sub-lang en --embed-subs'
alias ytdlmax="yt-dlp -f "bestvideo+bestaudio/best" --write-auto-sub --sub-format srt/best --sub-lang en --embed-subs"
alias nu="nu --config '.config/nushell/config.nu' --env-config '.config/nushell/env.nu'"
alias coinflip="shuf -r -n 1 -e heads tails"
alias vidres="ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0"
###################
##### pico.sh #####
###################
alias pico-web='open -a Safari localhost:1337; ssh -L 1337:localhost:80 -N pico-ui@pgs.sh'
###############################
##### OS Specific aliases #####
###############################
if [[ $(uname) == 'Darwin' ]]; then
alias rmds_store='find ~ -name ".DS_Store" -depth -exec rm {} \;'
elif [[ $(uname) == 'Linux' ]]; then
alias bc='bc -l'
#alias git='scl enable rh-git29 httpd24 -- git' # Only for scl, see
# See https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/2/html/Packaging_Guide/sect-Enabling_the_Software_Collection.html
else
alias R='/cygdrive/c/Program\ Files/R/R-3.1.3/bin/R --no-save --quiet'
fi