Static library:
nm -gU nameOfLibrary.a
Shared library
objdump -T xxx.so
Thursday, May 9, 2013
Tuesday, November 20, 2012
Install Gitosis on CentOS for multiple developers
Install Gitosis
[@Server]
1. Download Gitosis from https://github.com/tv42/gitosis (or git clone git://eagain.net/gitosis )2. Install it by
cd gitosis
python setup.py install
If you get errors, try yum install python-setuptools
Generate SSH public/private key (If you don't have one)
[@Local]1. To generate a public/private key, run
ssh-keygen -t rsa
2. The newly generated public key will be at $Home/.ssh/ directory and named id_rsa.pub. Private key will be named id_rsa.
3. Upload your public key to server's /tmp directory
scp ~/.ssh/id_rsa.pub username@SERVER_IP_ADDRESS:/tmp/YourPublicKey.pub
Configure Gitosis
[@Server]
1. Create a user to own the repositories, usually called git
1. Create a user to own the repositories, usually called git
adduser git
2. Create the repository and add YourPublicKey into authorized keys
sudo -H -u git gitosis-init < /tmp/YourPublicKey.pub
Configure the permissions
[@Local]1. To configure who can access to your repositories, clone gitosis-admin first and then edit gitosis.conf in gitosis-admin directory
git clone git@SERVER_IP_ADDRESS:gitosis-admin.git
cd gitosis-admin
vi gitosis.conf
2. Add a repository, TestProject, and make user Howard has full access to it.
[New group]
members = Howard
writable = TestProject
3. Get Howard's public key, Howard.pub, from Howard and put it into keydir of gitosis-admin
cp Howard.pub keydir
4. Once done, commit it and push to remote server.
git commit -m "Give Howard full access to TestProject"
git push
Create the repository TestProject
[@Local]
1. User Howard creates the TestProject, initialize it and push it to remote server
mkdir TestProject
cd TestProject
git init
git remote add originServer git@SERVER_IP_ADDRESS:TestProject.git
// create files, git add . and commit
git add .
git commit -m "Initial commit"
git push originServer master:refs/heads/master
2. Now TestProject is created and available on server
3. To allow user Sibo accessing TestProject, edit gitosis.conf of gitosis-admin and add Sibo to members of [New group] and put Sibo's public key into keydir of gitosis-admin
4. Commit it and push it remote server and now Sibo will be able to clone TestProject from remote server
[@Sibo Local]
git clone git@SERVER_IP_ADDRESS:TestProject.git
Wednesday, November 14, 2012
Git commands
git add . : stages new and modified, without deleted
git add -u : stages modified and deleted, without new
git add -A : stages All
Wednesday, October 31, 2012
application executable is missing a required architecture
The minimum Target supported for XCode 4.5 is iOS 4.3 which means iPhone 3G is no longer supported since the highest iOS version for iPhone 3G is iOS 3.1.3)
So to fix this problem:
. Change iOS Development Target to "iOS 4.3"
. Remove armv6 from the "Architectures" and "Valid Architectures"
Tuesday, September 18, 2012
Compile x264 for Mac OS X (32bits)
./configure --enable-pic --enable-shared --disable-asm --host=i686-apple-darwin11.1.0 --extra-cflags="-arch i386" --extra-ldflags="-arch i386"
Friday, August 17, 2012
Map Box.net storage as a local folder through WebDAV
Steps to map Box.net storage as a local folder
1. Go to Computer
2. Click Map network drive
3. Click "Connect to a web site that you can use to store your documents and pictures"
4. Check "Reconnect at logon"
5. Enter "https://www.box.net/dav" when specifying the location of your website
6. Enter the credentials of your Box.net account
7. That's it.
To unmap the network drive, simply delete it.
1. Go to Computer
2. Click Map network drive
3. Click "Connect to a web site that you can use to store your documents and pictures"
4. Check "Reconnect at logon"
5. Enter "https://www.box.net/dav" when specifying the location of your website
6. Enter the credentials of your Box.net account
7. That's it.
To unmap the network drive, simply delete it.
Thursday, May 10, 2012
Change the location of iPhone/iPad backup in Windows 7
Source : http://aaltonen.us/2011/01/03/change-the-location-of-your-iphone-backup/
Steps:
Steps:
- Close iTunes
- Move the existing C:\Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\ folder to the destination drive (for example, D:\)
- Open a command prompt and create an NTFS junction point using a command similar to the one below, replacing D:\Backup with the path to your destination:
- mklink /J "C:\Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup" "D:\Backup"
Subscribe to:
Posts (Atom)
Check clients which connect to Mac OS X Wi-Fi Internet Sharing
arp -i bridge100 -a bridge100 may be different on your Mac OSX
-
1. Create an account on TestFlight ( http://testflightapp.com ) and with "Developer" option checked. 2. Log in to the TestFlight ...
-
[轉載] [Javascript] Encrypt your private blog post from the article of Kaie's Blog 今日在PPT上的Blog版逛到版友weijr所提到的一篇好文章,可以用來針對Blog中某一段文字給予加密,變成...
-
For Mac OS: Use lipo. Ex. lipo -info staticLibrary.a For Linux OS: Use file Ex. file staticLibrary.c