Thursday, December 17, 2015

Mac OS X mini FAQ for developers

Q: Where are the config files (plist)?
A: User config in "~/Library/Preferences/com.company.application.plist"or generally ‘~/.application.rc’
System-wide config "/etc/company/some.conf”

Q: How to show the hidden folder ~/Library?
A: command+shift+G, enter ~/Library

Q: How to edit a plist file?
A: Install xcode, then the plist file can be double-clicked opened. 

After making changes to the plist file, restart OSX to take effect.

Q: Where are the application logs?
A: ~/Library/Logs/company/application

Q: How to change locale?
A: changing OSX language:Click "Setup" (the gears) icon from the dash board;

  1. click "Language & Region"; 
  2. In the "Preferred languages:" box, add the new language, 
  3. drag the new language to the top of the list.
  4. restart your computer to take effect.
Q: OS X Yosemite WIFI disconnects every ~5 minutes?
A: OS X 10.10.0 and 10.10.1 have this problem. Either you downgrade to 10.9.x or not using WIFI.

Q: Where are the crash logs?
A: In ~/Library/Logs/DiagnosticReports/

Labels: ,

Tuesday, December 15, 2015

GIT - How to drop a commit in the middle of branch

Say, I have a branch:
O --> A --> D --> B --> C           master

and I want to make it

O --> A --> B --> C            master

If changing the hashes is not a problem, meaning you haven't pushed, or knowning no one else has checked out the branch (although very unlikely for master branch), could do this:

git rebase --onto A D C

Note that since then, hashes on B C are changed.

Labels: