Which programs are using a specific tcp/udp port?
lsof -i :portNumber lsof -i tcp:portNumber lsof -i udp:portNumber lsof -i :80 lsof -i :80 | grep LISTEN
Which programs are using a specific tcp/udp port?
lsof -i :portNumber lsof -i tcp:portNumber lsof -i udp:portNumber lsof -i :80 lsof -i :80 | grep LISTEN
You can ask git to use a specific ssh key:
git config core.sshCommand "ssh -i /path/to/key"
Show the commands to delete old snapshots:
sudo tmutil listlocalsnapshots / | sed 's/.*TimeMachine./sudo tmutil deletelocalsnapshots /g;s/.local$//g'
Add this line at the top of /etc/pam.d/sudo
:
auth sufficient pam_tid.so
For more information, see here.
Things to remember next time:
Applications/Macports: Save a list of applications and requested Macports
ls /Applications > applications.txt sudo port -qv installed | cut -d ' ' -f 3 | sort -u > myports.txt sudo port echo requested | cut -d ' ' -f 1 | sort -u > requested.txt
On new mac:
Remove shadow from screen shots: (see here)
defaults write com.apple.screencapture disable-shadow -bool TRUE
Other settings
Also consider:
This can be done as shown below
sudo defaults write /Library/Preferences/com.apple.RemoteManagement.plist VNCOnlyLocalConnections -bool yes
Sometimes it is nice to be able to reinstall a MacPorts port with your own special configure options.
Step 0: Update Macports
sudo port selfupdate sudo port upgrade outdated
Step 1: Locate the Portfile in question and edit it
cd /opt/local/var/macports/sources/rsync.macports.org//macports/release/tarballs/ports/devel/openssl sudo emacs -nw Portfile # add a few lines e.g., in the configure section enable-ssl3 \ enable-ssl3-method \ enable-weak-ssl-ciphers \ enable-rc5 \
Step 2: Uninstall and then re-install the Port (-s = from source)
sudo port uninstall -f openssl sudo port -s -v install openssl
Step ∞: Remember to redo Steps 1 and 2 each time you do a port selfupdate
Most Mac applications use ctrl-a and ctrl-e (option-a/e) to move to the beginning resp. end of line.
Mac Word does by default not.
To set this up:
This is a quick list of the steps necessary to make your MacPorts installation work when upgrading to a new version of Mac OS X.
You may want first to do port selfupdate etc to upgrade to the newest version of MacPorts.
Also remove all unnecessary packages etc.
For more information, have a look at this page.
sudo port uninstall inactive
Save a list of all installed ports + whether they were specifically requested
sudo port -qv installed | cut -d ' ' -f 3 | sort -u > myports.txt sudo port echo requested | cut -d ' ' -f 1 | sort -u > requested.txt
For more information, see this page.
sudo port -f uninstall installed sudo port clean all
For more information, see this page (same as Step 2).
Install Xcode, and then basically follow the remaining steps from this page.
This is due to Yosemite requiring kernel modules to be signed. Run this command and restart:
sudo nvram boot-args="kext-dev-mode=1"
See this page for further information.
Some CPU’s use CPU throttling to reduce the speed of the CPU when it is not in heavy use Continue reading »