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 | |
| # A tweaked clone of obihann's macOS implementation | |
| # of archey (https://github.com/obihann/archey-osx/). | |
| # test to see if bash supports arrays | |
| arraytest[0]='test' || (echo 'Error: Arrays are not supported in this version of | |
| bash.' && exit 2) | |
| # Detect the packager. |
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 | |
| brew update | |
| brew upgrade | |
| brew cleanup -s | |
| rm -rf "$(brew --cache)" | |
| brew doctor | |
| mas upgrade |
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 | |
| MISSES=$(unbound-control stats_noreset | grep total.num.cachemiss | grep -Eo '[0-9]{1,8}') | |
| HITS=$(unbound-control stats_noreset | grep total.num.cachehits | grep -Eo '[0-9]{1,8}') | |
| PERCENT=$(echo "scale=4; (($MISSES / ($MISSES + $HITS) * 100))" | bc | awk ' sub("\\.*0+$","") ') | |
| echo "There are $MISSES cache misses and $HITS cache hits for a miss rate of $PERCENT%." | |
| echo |
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 | |
| # A dumbed-down version of dig-dug by crunchprank, sans csv logging. | |
| # (A mass domain DiG script.) | |
| # Usage: sudo bash ./dig.sh domains | |
| while IFS= read -r domain | |
| do |
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 | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install | |
| # Homebrew | |
| brew install cask # Install Homebrew-Cask | |
| brew install mas # and mas via Homebrew. | |
| brew update | |
| brew install speedtest-cli | |
| brew install bash # Install Command Line Tools |
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
| from datetime import date | |
| from webbrowser import open_new | |
| from os.path import join as pjoin, expanduser | |
| import requests | |
| home = expanduser('~') | |
| today = str(date.today()) | |
| newsApiKey = '' # Save your keys here. | |
| guardianApiKey = '' # Free API keys can be generated from | |
| # News API (https://newsapi.org/register) and the |
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
| from secrets import SystemRandom | |
| pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.@?!#$%&~-_' | |
| print("Password Generator!") | |
| while True: | |
| try: | |
| n = input("Enter the number of characters you want your password to be: ") | |
| r = SystemRandom() | |
| x, y = r.choice(pool), [] |