Wednesday, February 29, 2012

Install Git on CentOS

Source1: http://www.davegardner.me.uk/blog/2010/01/29/setting-up-git-on-centos-5-server/
Source2: http://stackoverflow.com/questions/8059743/trying-to-install-git-on-centos-5-and-a-little-lost

Installing Git on CentOS 5 is easy if you make use of the EPEL (Extra Packages for Enterprise Linux) repository.
1. To setup EPEL all you need to do is create a file /etc/yum.repos.d/epel.repo and then paste in the following:
[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 5 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1
2. Install GPG Keys


Go into rpm-gpg directory
cd /etc/pki/rpm-gpg/
Download GPG KEYS from https://fedoraproject.org/keys
wget https://fedoraproject.org/static/217521F6.txt
Rename to "217521F6.txt" to "RPM-GPG-KEY-EPEL"
cp 217521F6.txt RPM-GPG-KEY-EPEL
Remove "217521F6.txt" because we don't need in that file anymore
rm 217521F6.txt
If you want you can remove prefix lines from the file by vim and :wq (:Write and Quit)
vim RPM-GPG-KEY-EPEL
3. Installing git git-daemon
yum install git git-daemon

Friday, February 24, 2012

[iOS Developer] How to use TestFlight to distribute your beta app

1. Create an account on TestFlight (http://testflightapp.com) and with "Developer" option checked.
2. Log in to the TestFlight web site and "Add a team" for your app.
3. Add teammates, either testers or developers. (PS. Recruiting testers from public is also available)
4. Ask your teammates to register their iOS devices following the instructions in the Email. (Do it on their iOS devices)
5. Once they accepted to being the teammates and registered their devices, you will be able to see their devices information such as device model, iOS version, and UDID.
6. Add their devices/UDIDs to your Provisioning Portal -> Devices.
7. Modify the Ad-Hoc provisioning profile to include the newly added devices and install the updated provisioning profile to your XCode.
8. Build your app in Ad-Hoc mode and locate the YourAppName.ipa.
   . For XCode 4: http://support.testflightapp.com/kb/tutorials/how-to-create-an-ipa-xcode-4
   . For XCode 3: http://support.testflightapp.com/kb/tutorials/how-to-create-an-ipa-xcode-3
9. Log in to TestFlight web site, click "Upload Build" and follow the instructions to finish uploading the app.
10. Your teammates will be able to install the app you just uploaded to their devices with TestFlight app on their iOS devices.

Wednesday, February 22, 2012

XCode breakpoint not working

Sometimes the XCode breakpoint becomes not working somehow. To solve this problem, simply restart the iOS device.

Tuesday, February 21, 2012

Update NVIDIA Graphic card driver for SONY laptop

Steps:
1. Get the latest driver from NVIDIA and unpack it.
2. Look up the hardware id of the Graphic card in Device Manager -> Display adapters -> NVIDIA GeForce 8400M GS -> Properties -> Details tab. Select "Hardware Ids" from the Property dropdown checkbox and then it will be listed. There should be something like PCI\VEN_10DE&DEV_0427&SUBSYS_9008104D. Here 0427 after DEV_ is the hardware id.
3. Go the driver folder unpacked earlier and locate nvam.inf (in driver folder) and open it with any text editor. Find the entries start with %NVIDIA_DEV.0427, and replace the value after SUBSYS_
Ex.
From %NVIDIA_DEV.0427.01% = Section001, PCI\VEN_10DE&DEV_0427&SUBSYS_17C21043
To %NVIDIA_DEV.0427.01% = Section001, PCI\VEN_10DE&DEV_0427&SUBSYS_9008104D
5. Save the nvam.inf
6. Run the setup.exe to install the latest driver

Friday, February 17, 2012

Mac-to-Mac: Remote Desktop (Remote Control)

1. Enable the remote management or screen sharing function on the target Mac which is to be controlled.
. System Preference -> Sharing -> Remote Management
. System Preference -> Sharing -> Screen Sharing

2-A. Apple remote desktop (remote management, not free)
. Start "Remote Desktop"(Install the apple remote desktop admin if it's not installed yet)
. Locate the target Mac and connect to it

2-B. Screen Sharing (free)
. Finder -> Go -> Connect to server
   type in vnc://ip_address_of_the_target_mac

Monday, February 13, 2012

Excel Date to Epoch time conversion formula

Date to Epoch time: (A1: Date cell)
=(A1-25569)*86400

Epoch time to Date: (A1: Epoch time cell)
=(A1/86400)+25569
PS. Need to format the cell to date

Check clients which connect to Mac OS X Wi-Fi Internet Sharing

arp -i bridge100 -a bridge100 may be different on your Mac OSX