-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.aliases
71 lines (63 loc) · 2.49 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
67
68
69
70
71
# Aliases
alias ll='ls -lFh'
alias la='ls -A'
alias l='ls -CF'
alias mv='mv -i $*'
alias th='thunar .'
alias vim='nvim'
alias poogle='ping google.com'
alias t='tmux attach || tmux'
alias skyrock="mpv http://www.skyrock.fm/stream.php/frequenceradio_128mp3.mp3"
alias git='LANG=en_US.UTF-8 git'
alias rm='echo "This is not the command you are looking for."; false'
alias copy='xclip -selection clipboard'
alias nomachine='/usr/NX/bin/nxplayer'
alias drawio='chromium --app=http://draw.io'
alias standardnotes='chromium --app=https://app.standardnotes.org'
alias grafana='chromium --app=https://grafana.ethibox.fr'
alias toggl='chromium --app=https://toggl.com/app/timer'
alias portmaster='/opt/safing/portmaster/portmaster-start app --data=/opt/safing/portmaster'
monitor() { watch -n1 -t "lsof -i -n|awk '{print \$1, \$2, \$9}'|column -t"; }
gi() { curl -L "https://www.gitignore.io/api/$@"; }
yt-dlp-mp3() { yt-dlp $1 --extract-audio --audio-format mp3; }
streamer() { yt-dlp -o - "$1" | mpv -; }
detach() { sudo umount -l "/dev/"$1"1"; udisksctl power-off -b "/dev/$1"; }
debug() { sudo strace -Ff -tt -p $(pidof $1) 2>&1 | tee strace-$1.log; }
drm() { docker rm $(docker ps -a | grep 'Exited\|Created' | awk '{print $1}') > /dev/null 2>&1; }
drmi() { docker rmi $(docker images --no-trunc | grep none | awk '{print $3 }') > /dev/null 2>&1; }
dpa() { docker ps -a; }
whitespace() { sed -i 's/[[:space:]]*$//' $1; }
timestamp() { date -d @$1; }
live() {
qemu-img create -f raw live 8G
qemu-system-x86_64 -enable-kvm -cpu host -m 4096 -drive file=live,format=raw -cdrom "$1"
rm live
}
stopwatch(){
date1=`date +%s`;
while true; do
echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r";
sleep 0.1
done
}
genssl(){
if [ -z "$1" ]; then
echo "usage: genssl [domain]"
else
openssl genrsa -out $1.key 1024
openssl req -new -key $1.key -out $1.csr
openssl x509 -req -days 365 -in $1.csr -signkey $1.key -out $1.crt
fi
}
screenshot () {
pageres --filename=screenshot -d 5 --overwrite $1
imgur upload screenshot.png
}
similarweb () {
curl -s -H "x-rapidapi-key: $RAPIDAPI_KEY" "https://similar-web.p.rapidapi.com/get-analysis?domain=$1" \
| jq -r '.GlobalRank.Rank' | numfmt --grouping
}
competitors () {
curl -s -H "x-rapidapi-key: $RAPIDAPI_KEY" "https://similar-web.p.rapidapi.com/get-similar-sites?domain=$1" \
| jq -r '(.SimilarSites // []) | map({Site, GlobalRank}) | sort_by(.GlobalRank) | reverse[] | "\(.Site) (\(.GlobalRank))"'
}