Tuesday, July 31, 2012

Using SyntaxHighlighter with Blogger

As this blog is about Dev and Technology there might be some "code" posting and its only make sense that it'll be posted in a nice graphic readable way.

So after messing around i found out that SyntaxHighlighter is probably the best way to post code in Blogger. But expect nothing out of the box. this guide will show you how to add SyntaxHighlighter features to your Blog:

1. Make sure you are using Editable template (or all of this is not possible) by going to template settings in your blog and finding the Edit HTML button.


2. Press the Edit HTML button and find the </title> tag.
3. paste the following line AFTER the </title> tag:



4. choose brushes from Bundled Brushes and create line for each brush you want to have:


replacing XX.js with the brush file name from  Bundled Brushes 
for example:
5. find the </body> tag and paste the following BEFORE the tag:



6. when you want to post source code just use:

 bla bla 

for example. thats it. Enjoy.

Using OSX10.6 SDK with Xcode 4.4

I just discovered that after upgrading to Mountain Lion and Xcode 4.4 i get the following error (while trying to build AOSP) because Apple removed OSX10.6 SDK from xcode 4.4:

build/core/combo/HOST_darwin-x86.mk:38: *****************************************************
build/core/combo/HOST_darwin-x86.mk:39: * Can not find SDK 10.6 at /Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:40: * ** /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/HOST_darwin-x86.mk:41: *****************************************************
build/core/combo/HOST_darwin-x86.mk:42: *** Stop..  Stop.


To solve this issue follow this guide:

1. Go to https://developer.apple.com/downloads/index.action and download Xcode 4.3.3 for lion.



2. After downloading mount the DMG file and browse its content (by clicking Show Package Content)

3. Browse to 

Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
4. Copy MacOSX10.6.sdk folder.
5. Repeat steps 2-3 on the real (4.4) Xcode (/aplications/xcode.app) and paste the OSX10.6 folder

And thats about it. Enjoy :)