-
-
Save ehsanpo/1c205438c1e67b7c8e12a35e996e50f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| NAME="$(id -F)" | |
| HI="Good Morning, $NAME" | |
| Weather=$(curl -s http://wttr.in/malmo?T | grep -m 1 -Eo -e '-?[[:digit:]].*°.+') | |
| echo "Warming up" | |
| brew update | |
| brew outdated | |
| brew upgrade | |
| brew upgrade --cask | |
| brew cleanup -s | |
| #now diagnotic | |
| brew doctor | |
| brew missing | |
| # gem update --system | |
| # Clean logs | |
| # Get the current day of the week (1 = Monday, 7 = Sunday) | |
| DAY_OF_WEEK=$(date +%u) | |
| # Get the current day of the month | |
| DAY_OF_MONTH=$(date +%d) | |
| # Check if it's the first Monday of the month | |
| if [ "$DAY_OF_WEEK" -eq 1 ] && [ "$DAY_OF_MONTH" -le 7 ]; then | |
| rm ~/bin/brew_update_logs.txt | |
| fi | |
| # npx browserslist@latest --update-db | |
| # change mac | |
| NEWMAC= openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | |
| sudo ifconfig en0 ether $NEWMAC | |
| say "$HI" | |
| say "Weather today is $Weather" | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment