This file contains 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
# Initialize-PowerCLIEnvironment_Custom.ps1 | |
# Place this alongside the default 'Initialize-PowerCLIEnvironment.ps1' script. | |
# Usage: | |
# 1) Call 'Update-Credentials' to create/update a ViCredentialStoreItem to securely store your username and password. | |
# 2) Call 'Connect-VCs' to open simultaneously connections to all the vCenters in your environment. | |
# 3) Do PowerCLI things. | |
# 4) Call 'Disconnect-VCs' to cleanly close all ViServer connections because housekeeping. | |
$vCenterList = @("vcenter1","vcenter2","vcenter3","vcenter4") |
This file contains 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
# Reference https://www.reddit.com/r/WearOS/comments/en3989/debloat_the_fossil_smartwatch/ | |
# Connect to the watch with 'adb connect IP_ADDRESS:PORT' | |
# Open an ADB shell with 'adb -s IP_ADDRESS:PORT shell' | |
# Then paste in all this stuff: | |
pm uninstall --user 0 com.dianping.v1 | |
pm uninstall --user 0 com.google.android.wearable.smarthome | |
pm uninstall --user 0 com.sogou.map.android.maps | |
pm uninstall --user 0 com.mobvoi.wear.fitness.aw | |
pm uninstall --user 0 com.mobvoi.ticwear.sidewearvoicesearch |
This file contains 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
grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ACCESS_LOG.TXT | grep -v "127.0.0.1" | sort | uniq -c | sort -n -r | head -n 5 | |
# Bonus kludge for parsing multiple gzipped logs for the same. Also prints the logfile datestamp for each file as well: | |
for i in {1..20}; do date -r ACCESS_LOG.$i.gz; zgrep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' \ACCESS_LOG.log.$i.gz | grep -v "127.0.0.1" | sort | uniq -c | sort -n -r | head -n 5; done |