Here is how you flush the DNS cache on your OSX El Capitan machine:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
To make sure that the cache is flushed you could also change your ISP’s DNS server to Google’s DNS: 188.8.131.52 just for the time you do the tests.
Here are some very basic navigation tips every programmer that works with Xcode must know and use them.
Tip 1. Go to the beginning or the end of line
Here is a quick tip: to go to the beginning of a code line in Xcode press:
Cmd + left arrow key
To go to the end of line press:
Cmd + right arrow key
Tip 2. Jump from word to word
To jump from word to word press:
Alt + left arrow key (to jump to left word)
Alt + right arrow key (to jump to right word)
Tip 3. Move cursor a page up or down
To move cursor one page up press:
Alt + Page Up key
To move the cursor one page down press:
Alt + Page Down key
If you reinstall your OSX and want to keep your notes but you do not want to use cloud then you must backup the following folder:
Then after you’ve installed the new OSX just copy files from your backup to that folder (overwrite it) and voila you have the notes when you run Notes app.
To activate spotlight search from Keyboard on your OSX machine just press:
Command + Space
Press Alt + Shift + K to display apple logo in a text prompt.
I know, it’s kind of useless tip.
Let’s say you want to build a Command Line Tool in XCode 4 and you want to link an existing framework with your app.
In order to do that go to your project then select your target, then choose Build Phases, then add the framework at section Link Binary With Libraries.
This is very useful when you write a blog post.
You can check grammar from within Safari (or other OSX app like Mail for example) by enabling Grammar Spell Check.
To enable check spelling under Safari go to:
Edit -> Spelling and Grammar -> Check Grammar With Spelling
Then go to:
Edit -> Spelling and Grammar -> Show Spelling and Grammar
You might also want to disable autocorrect:
Edit -> Spelling and Grammar -> Correct Spelling Automatically
If you are using Safari browser in OSX and you want to reload a html page you will notice F5 key that reloads a page under Firefox browser is not working on Safari.
To reload a page in Safari under OSX just press CMD + R keys.
If you have multiple copies of a project with source-code files and you don’t know
howto quickly compare in order to find out which of them is newer, or what changes you’ve
made to the source code.
You will find this small app in: /Developer/Applications/Utilities