File tree Expand file tree Collapse file tree 4 files changed +60
-13
lines changed Expand file tree Collapse file tree 4 files changed +60
-13
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ alias cal="/bin/cal -m"
5151alias vdirsyncer=" vdirsyncer -c ~/.config/vdirsyncer/config"
5252alias eslint=" /bin/eslint --config '$HOME /.config/eslint/eslintrc'"
5353alias neofetch=" /bin/neofetch --os_arch off --cpu_brand off --gtk2 off --gtk3 off --shell_version off --package_managers off --uptime_shorthand tiny --gpu_brand off"
54- alias npm=" /bin/npm -s"
5554alias ani-cli=" /bin/ani-cli -q 720"
5655yay () {
5756 if [ -z " $1 " ]; then
Original file line number Diff line number Diff line change 1414 exit
1515fi
1616
17- command -v chromium > /dev/null || { echo " chromium is not installed" 1>&2 ; exit 127; }
18-
19- chromium " https://www.earningswhispers.com/stocks/$1 " > /dev/null 2>&1 &
17+ if command -v chromium > /dev/null; then
18+ chromium " https://www.earningswhispers.com/stocks/$1 " > /dev/null 2>&1 &
19+ else
20+ $BROWSER " https://www.earningswhispers.com/stocks/$1 " > /dev/null 2>&1 &
21+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [ " $1 " = " --help" ] || [ " $1 " = " -h" ] || [ " $1 " = " help" ]; then
4+ cat << EOF
5+ $ up
6+ Update everything.
7+
8+ Not just pacman -Syu, but various other things that need regular updates.
9+ EOF
10+ exit
11+ fi
12+
13+ # command -v <++> >/dev/null && run_<++>
14+
15+ log () {
16+ local category=$1
17+ local text=" $2 "
18+ printf " \033[1;32m[%s]\033[1;33m %s\n\033[1;0m" " $category " " $text "
19+ }
20+
21+ run_antidot () {
22+ log antidot " Update antidot rules"
23+ antidot update
24+ }
25+ command -v antidot > /dev/null && run_antidot
26+
27+ run_volta () {
28+ log volta " Update volta apps"
29+ volta install node
30+ volta install npm
31+ volta install yarn
32+ }
33+ command -v volta > /dev/null && run_volta
34+
35+ run_yay () {
36+ log yay " System update"
37+ yay --color=always
38+ }
39+ command -v yay > /dev/null && run_yay
40+
41+ run_hosts () {
42+ log hosts " Updating hosts"
43+ update-hosts
44+ }
45+ command -v update-hosts > /dev/null && run_hosts
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- if [[ $1 = " --help" ]] || [[ $1 = " help" ]]; then
4- echo " $ sudo hostsup"
5- echo " Update /etc/hosts & /etc/hosts.deny files from"
6- echo " https://github.com/mitchellkrogza/Ultimate.Hosts.Blacklist"
3+ if [ " $1 " = " --help" ] || [ " $1 " = " help" ]; then
4+ cat << EOF
5+ $ update-hosts
6+ Update /etc/hosts & /etc/hosts.deny files from:
7+ https://github.com/mitchellkrogza/Ultimate.Hosts.Blacklist
8+ EOF
79 exit
810fi
911
@@ -13,12 +15,11 @@ OG_HOSTS=/home/jneidel/code/dotfiles/etc/hosts
1315TMP_HOSTS=/tmp/hosts
1416
1517echo " Setting $HOSTS "
16- sudo rm $HOSTS $TMP_HOSTS 2> /dev/null
18+ sudo rm $HOSTS $TMP_HOSTS 2> /dev/null
1719cp $OG_HOSTS $TMP_HOSTS
18- curl -L -# https://hosts.ubuntu101.co.za/hosts | sed " 1,55d; /0.0.0.0 soundcloud.com/d; /0.0.0.0 imagecomics.com/d; /0.0.0.0 meetup.com/d; /0.0.0.0 musicbrainz.org/d; /0.0.0.0 xkcd.com/d; /0.0.0.0 www.namecheap.com/d; /0.0.0.0 1337x.to/d; /0.0.0.0 larrysanger.org/d; /0.0.0.0 www.theguardian.com/d; /0.0.0.0 www.heise.de/d; /0.0.0.0 heise.de/d; /0.0.0.0 turbobit.net/d; /0.0.0.0 azlyrics.com/d; /0.0.0.0 youtu.be/d; /0.0.0.0 fonts.gstatic.com/d; /0.0.0.0 redirector.googlevideo.com/d; /0.0.0.0 fonts.googleapis.com/d; /0.0.0.0 fonts.gstatic.com/d; /0.0.0.0 youtu.be/d; /0.0.0.0 ?www.youtube-nocookie.com/d; /0.0.0.0 storage.googleapis.com/d; /0.0.0.0 scholar.google.com/d;" >> $TMP_HOSTS
20+ curl -L -# https://hosts.ubuntu101.co.za/hosts | sed " 1,55d; /0.0.0.0 soundcloud.com/d; /0.0.0.0 imagecomics.com/d; /0.0.0.0 meetup.com/d; /0.0.0.0 musicbrainz.org/d; /0.0.0.0 xkcd.com/d; /0.0.0.0 www.namecheap.com/d; /0.0.0.0 1337x.to/d; /0.0.0.0 larrysanger.org/d; /0.0.0.0 www.theguardian.com/d; /0.0.0.0 www.heise.de/d; /0.0.0.0 heise.de/d; /0.0.0.0 turbobit.net/d; /0.0.0.0 azlyrics.com/d; /0.0.0.0 youtu.be/d; /0.0.0.0 fonts.gstatic.com/d; /0.0.0.0 redirector.googlevideo.com/d; /0.0.0.0 fonts.googleapis.com/d; /0.0.0.0 fonts.gstatic.com/d; /0.0.0.0 youtu.be/d; /0.0.0.0 ?www.youtube-nocookie.com/d; /0.0.0.0 storage.googleapis.com/d; /0.0.0.0 scholar.google.com/d;" >> $TMP_HOSTS
1921sudo mv $TMP_HOSTS $HOSTS
2022
2123echo " Setting $HOSTS_DENY "
22- sudo rm $HOSTS_DENY > /dev/null
23- sudo wget -q https://hosts.ubuntu101.co.za/superhosts.deny -O $HOSTS_DENY
24-
24+ sudo rm $HOSTS_DENY 2> /dev/null
25+ sudo wget https://hosts.ubuntu101.co.za/superhosts.deny -O $HOSTS_DENY
You can’t perform that action at this time.
0 commit comments