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
Get all feature options | |
lpoptions -p [printer] -l | |
Install a printer using generic driver | |
Install a printer | |
lpadmin -p "HP-576dw-3-S" -D "HP X576dw (3 South)" -E -v lpd://192.168.60.53 -P "/Library/Printers/PPDs/Contents/Resources/HP Officejet Pro X476-X576 MFP.gz" -o printer-is-shared=false | |
Make a printer default (use the name from -p) | |
lpoptions -d New_Printer_PPD |
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
There's a way you can see what the naughty kernel_task is up to. | |
/Applications/Utilities/Activity Monitor.app | |
View -> All Processes | |
Select the `kernel_task` process in the list | |
<gear menu> Spindump | |
So if it says something like `45 samples (187-231)` you know that bit was short lived - but if it says `1000 samples (1-1000)` - either it was blocked during the 10 second run, or it might be a culprit chewing away at your machine | |
Long number of samples + high `cpu time` value for the thread = indicator it put a lot of load on your machine |
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
#!/bin/bash | |
# run elevated (with sudo) | |
rm -f /.metadata_never_index | |
mdutil -i off / | |
rm -rf /.Spotlight* | |
mdutil -i on / | |
mdutil -E / | |
exit 0 |
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
#!/bin/sh | |
myIP=`curl -L -s --max-time 10 http://checkip.dyndns.org | egrep -o -m 1 '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}'` | |
myLocationInfo=`curl -L -s --max-time 10 http://freegeoip.net/xml/$myIP` | |
myCountryCode=`echo $myLocationInfo|egrep -o '<CountryCode>.*</CountryCode>'| sed -e 's/^.*<CountryCode/<CountryCode/' | cut -f2 -d'>'| cut -f1 -d'<'` | |
myCity=`echo $myLocationInfo|egrep -o '<City>.*</City>'| sed -e 's/^.*<City/<City/' | cut -f2 -d'>'| cut -f1 -d'<'` | |
myRegionName=`echo $myLocationInfo|egrep -o '<RegionName>.*</RegionName>'| sed -e 's/^.*<RegionName/<RegionName/' | cut -f2 -d'>'| cut -f1 -d'<'` | |
echo "<result>$myCity, $myRegionName - $myCountryCode</result>" |
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
/usr/sbin/softwareupdate --reset-ignored | |
/bin/rm -rf /Library/Preferences/com.apple.SoftwareUpdate.plist | |
/usr/bin/killall cfprefsd |
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
Get-MailboxFolderStatistics bryanh -FolderScope Inbox | Select-Object Name, ItemsInFolderAndSubfolders |
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
echo "Enter new name:" | |
read newmacname | |
sudo scutil --set ComputerName "$newmacname" | |
sudo scutil --set HostName "$newmacname" | |
sudo scutil --set LocalHostName "$newmacname" |
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
profiles -C -o stdout-xml | grep -A 1 ProfileIdentifier |
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
1) Choose Power on to Firmware from the Virtual Machine menu | |
2) then Enter Setup | |
3) Boot from a file | |
4) Arrow down to Recovery HD | |
5) Hit enter until you can pick boot.efi | |
6) select boot.efi | |
7) hit enter |
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
# Run in Terminal, no restart required. | |
sudo sysctl debug.lowpri_throttle_enabled=0 | |
# Reverted at restart. |
OlderNewer