Skip to content

Instantly share code, notes, and snippets.

@ahelja
ahelja / wgetDownloadingAnEntireWebSite.sh
Created November 22, 2020 13:38
Wget downloading an Entire Web Site
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent http://www.website.org/subpage/
@ahelja
ahelja / renamingFoldersFilesAndSubfolders.sh
Created November 22, 2020 13:38
Renaming folders files and subfolders
find . -mindepth 1 -depth -iname \* -exec \
sh -c 'mv "$0" "$(tr "[:upper:]" "[:lower:]" <<<$0)"' {} \;
@ahelja
ahelja / howToCompletelyRemoveApps.sh
Created November 22, 2020 13:37
How to Completely Remove Apps
$ mdfind -name "application name"
$ sudo rm -rif /TheLibrary/LaunchDaemons/application-name /usr/sbin/application-name
@ahelja
ahelja / wgetDownloadAworkingLocalCopyOfAwebpage.sh
Created November 22, 2020 13:37
Wget Download a working local copy of a webpage
wget -p -k http://www.example.com/
@ahelja
ahelja / generateChecksumOfFileWithOpenssl.sh
Created November 22, 2020 13:36
Generate checksum of file with openssl
# SHA256, used in chef cookbooks
openssl dgst -sha256 path/to/myfile
# MD5
openssl dgst -md5 path/to/myfile
@ahelja
ahelja / touchMultipleItems.sh
Created November 22, 2020 13:35
Touch multiple items
touch {item1,item2,item3,item4}.txt
@ahelja
ahelja / findYourIpAddress.sh
Created November 22, 2020 13:34
Find your IP Address
ifconfig |grep inet
@ahelja
ahelja / cliCaffeine.sh
Created November 22, 2020 13:34
Cli caffeine
sudo pmset -a sleep 0
@ahelja
ahelja / createsAnewHtpasswd.sh
Created November 22, 2020 13:33
Creates a new .htpasswd
htpasswd -c /home/doe/public_html/.htpasswd jane
@ahelja
ahelja / FindLocalNetworkDevicesUsingPing.sh
Created November 22, 2020 13:33
Find local network devices using ping
arp -a