Friday, August 31, 2012

Pascal for XCode 4



See here http://www.objectivepascal.com

Free Pascal Compiler -> http://www.freepascal.org/

Direct Link -> http://nchc.dl.sourceforge.net/project/freepascal/Mac%20OS%20X/2.6.0/fpc-2.6.0.intel-macosx.dmg

XCode 4 Template is here http://dl.dropbox.com/u/28343282/ObjP/Xcode_Templates.html

This is the script to add pascal syntax coloring in Xcode 4
addpascalsyntax.sh    Select all
#!/bin/bash # # Updates Xcode 4 and to support Pascal language syntax coloring # set -e # Assumes Xcode 4+. XCODE_MAJOR_VERSION=`xcodebuild -version | awk 'NR == 1 {print substr($2,1,1)}'` if [ "$XCODE_MAJOR_VERSION" -lt "4" ]; then echo "Xcode 4.x not found." exit 1 fi # Path were this script is located SCRIPT_PATH="$(dirname "$BASH_SOURCE")" # Set up path for PlistBuddy helper application which can add elements to Plist files PLISTBUDDY=/usr/libexec/PlistBuddy # Filename path private framework we need to modify #DVTFOUNDATION_PATH="/Developer/Library/PrivateFrameworks/DVTFoundation.framework/Versions/A/Resources/" #DVTFOUNDATION_PATH="/XCode4.3/Library/PrivateFrameworks/DVTFoundation.framework/Versions/A/Resources/" # This framework is found withing the Xcode.app package and is used when Xcode is a monolithic # install (all contained in Xcode.app) DVTFOUNDATION_PATH="/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/" # Create Plist file of additional languages to add to 'DVTFoundation.xcplugindata' cat >AdditionalLanguages.plist <<EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Xcode.SourceCodeLanguage.Pascal</key> <dict> <key>languageSpecification</key> <string>xcode.lang.pascal</string> <key>fileDataType</key> <array> <dict> <key>identifier</key> <string>com.apple.xcode.pascal-source</string> </dict> </array> <key>id</key> <string>Xcode.SourceCodeLanguage.Pascal</string> <key>point</key> <string>Xcode.SourceCodeLanguage</string> <key>languageName</key> <string>Pascal</string> <key>version</key> <string>1.0</string> <key>documentationAbbreviation</key> <string>pascal</string> <key>conformsTo</key> <array> <dict> <key>identifier</key> <string>Xcode.SourceCodeLanguage.Generic</string> </dict> </array> <key>name</key> <string>Pascal Language</string> </dict> </dict> </plist> EOF # Backup cp "$DVTFOUNDATION_PATH/DVTFoundation.xcplugindata" "$DVTFOUNDATION_PATH/DVTFoundation.xcplugindata.bak" # Now merge in the additonal languages to DVTFoundation.xcplugindata $PLISTBUDDY "$DVTFOUNDATION_PATH/DVTFoundation.xcplugindata" -c 'Merge AdditionalLanguages.plist plug-in:extensions' # Get rid of the AdditionalLanguages.plist since it was just temporary rm -f AdditionalLanguages.plist # Copy in the xclangspecs for the languages (assumes in same directory as this shell script) #cp "$SCRIPT_PATH/Pascal.xclangspec" "$DVTFOUNDATION_PATH" # Remove any cached Xcode plugins rm -f /private/var/folders/*/*/*/com.apple.DeveloperTools/*/Xcode/PlugInCache.xcplugincache echo "Syntax coloring must be manually selected from the Editor - Syntax Coloring menu in Xcode."

Tuesday, August 28, 2012

How To Migrate Windows 7 to a Solid State Drive


Basically, I follow this guide to migrate windows 7 hard disk to a new SSD hard disk http://www.howtogeek.com/97242/how-to-migrate-windows-7-to-a-solid-state-drive/

The essential steps are

1. Create a system repair disc in a CD/DVD http://windows.microsoft.com/is-IS/windows7/Create-a-system-repair-disc

2. Backup your system hard disk to external HD using Windows 7 Backup Utility. And after backing up, Windows 7 will prompt you with an option to create a system repair disc in case you have forgotten the first step.

3. Find the recovery disk for the PC and download the LAN or WLAN drivers from the support site of the PC Manufacturer and with your Windows 7 Product Key on hand (which is usually a sticker on the PC).

4. Do this before you clone your hard disk in Windows command prompt (Run as Administrator)
slmgr /upk
slmgr /rearm

So that the cloned SDD hard disk will not get "not genuine" warning after boot up and that Windows 7 will prompt you to re-renter the Windows 7 Product Key and activate again.

5. I use Clonezilla using partition to partition clone (as my target hard disk is larger than the source partition), and after cloning, switch the new SSD HD as the second one in boot sequence in the BIOS, while the DVD drive as the first one to boot. Moreover the old Windows 7 hard disk has to be detached from the PC. Make sure you remove the power and/or battery before you add or remove physically parts of the PC.

6. After cloning to SDD, you need to boot up the machine using system repair disc that you created earlier, as the Boot Manager is missing in the cloned SSD hard disk

7. After boot up the system repair disc, you have to use the command prompt to assign the drive letter of the cloned SSD hard disk to C
Diskpart
List disk
Select disk n (where n is your SSD’s number as provided by the previous command)
ASSIGN LETTER=C
Active

Exit


8. You may need to boot up your machine using the system repair disc several rounds in order for repairing the startup.

9. After boot up the machine using the cloned SSD harddisk, the OS will prompt you to enter the Windows 7 Product Key.

10. In case you want to have a clean install of Windows 7 rather than cloning, you must have your recovery disk for the PC Manufacturer and hardware drivers and all the program install disks on hand.


Saturday, August 25, 2012

Mac Mini 2011 with 16G Ram



ADATA Premier Series DDR3 1333MHz (PC3 10600) SO-DIMM 8GB

Friday, August 3, 2012

Windows 7 CD Key

Windows 7 Ultimate Retail Key
J783Y-JKQWR-677Q8-KCXTF-BHWGC
C4M9W-WPRDG-QBB3F-VM9K8-KDQ9Y
2VCGQ-BRVJ4-2HGJ2-K36X9-J66JG
MGX79-TPQB9-KQ248-KXR2V-DHRTD
FJHWT-KDGHY-K2384-93CT7-323RC
THHH2-RKK9T-FX6HM-QXT86-MGBCP
KH2J9-PC326-T44D4-39H6V-TVPBY
D8BMB-BVGMF-M9PTV-HWDQW-HPCXX
TFP9Y-VCY3P-VVH3T-8XXCC-MF4YK

Windows 7 Professional Retail Key
HWRFF-2FFYX-XFXP2-DYFC3-BX3B7
YT9K9-4R938-3TVXX-3Q3QT-9HBXM
C3X7Y-R6WWH-BRXRD-FY84C-FXWHK
XJBR4-M42Q4-QPJ9C-BRDRJ-KHPVY
TF3Q7-YYP8R-D78R7-W9Q9M-DXVBK
J8D39-J2WM3-6368H-JV8G9-BYJJQ
P3H89-V3P2R-JVBTF-YM2J2-FTMT3
RGM4T-3VT6B-GTYPY-3FHP2-HV2YJ
TTY4D-RDKK9-TYB2T-68WJW-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