Skip to content

Posts from the ‘OSX’ Category


Flush DNS Cache in OSX El Capitan

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: just for the time you do the tests.


Go to beginning or end of line in Xcode and other navigation tips

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


Backup and Restore Notes on OSX

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.


Activate Spotlight Search from Keyboard

To activate spotlight search from Keyboard on your OSX machine just press:

Command + Space


Quick and Useless Tip: Display Apple Logo Character With a Shortcut

Press Alt + Shift + K to display apple logo in a text prompt.

I know, it’s kind of useless tip.


Add a framework in XCode 4.x

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.


Check Your Grammar When Writing in Safari

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


Reload a Page in Safari

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.


Set Firefox as Default Browser on OSX (tip)

To set Firefox as the default browser on OSX Lion, Leopard or Snow Leopard launch Firefox then
go to Preferences -> Advanced -> General (tab) and press Check Now button, then choose Yes.
Read more »


How to Compare Two Source Code Projects (tip)

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.

file merge osx

File Merge OSX

You will find this small app in: /Developer/Applications/Utilities