Sunday, February 27, 2011

How to Extend Mac OS X 10.x Partition in Vmware Workstation

how to use unallocated space and merge it into another Mac OS X partition. Basically these are the steps to expand the main partition after increasing the size of a virtual machine running MAC OS X.

Thursday, February 24, 2011

Add labels to Google blogger by API

PHP:
http://gdatatips.blogspot.com/2008/07/labeling-blogger-posts.html

$label1 = new Zend_Gdata_App_Extension_Category(
'foo', 'http://www.blogger.com/atom/ns#');
$label2 = new Zend_Gdata_App_Extension_Category(
'bar', 'http://www.blogger.com/atom/ns#');
$entry->setCategory(array($label1, $label2));

Java:
http://www.one-minute-info.com/2010/06/add-label-to-posts-via-java-blogger-api.html

myEntry = new Entry();
myEntry.setTitle(new PlainTextConstruct("some title"));
myEntry.setContent(new HtmlTextConstruct("some HTML body"));

categories=myEntry.getCategories();

category= new Category();
category.setTerm("whatever label you like such as Google Blogger or Java API");
category.setLabel(null);
category.setScheme("http://www.blogger.com/atom/ns#");
category.setLabelLang(null);

categories.add(category);

URL postUrl = new URL("http://www.blogger.com/feeds/123456/posts/default");
myService.insert(postUrl, myEntry);

Wednesday, February 23, 2011

google data and blogger api

http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries
http://code.google.com/apis/blogger/docs/1.0/developers_guide_js.html

http://itcoding.blogspot.com/feeds/posts/default?alt=json-in-script&category=mobile

Wednesday, February 16, 2011

Build and Archive iOS apps by command line

http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/


#!/bin/sh

# build.sh
#
# Created by Vincent Daubry on 19/01/10.
# Copyright 2010 OCTO. All rights reserved.

PROJDIR=${WORKSPACE}/___PROJECT NAME___
PROJECT_NAME=___XCODE PROJECT NAME___
TARGET_SDK="iphonesimulator4.0"
PROJECT_BUILDDIR="${PROJDIR}/build/Release-iphoneos"
TARGET_TEST_NAME="UnitTests"
BUILD_HISTORY_DIR="/Users/barbu/Desktop"
DEVELOPPER_NAME="iPhone Developer: M VINCENT DAUBRY (J9TS3TJRYX)"
PROVISONNING_PROFILE = "/Users/barbu/Desktop/desire.mobileprovision"

# compile project
echo Building Project
cd "${PROJDIR}"
xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Release

#Check if build succeeded
if [ $? != 0 ]
then
exit 1
fi

/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPPER_NAME}" --embed "${PROVISONNING_PROFILE}"

codebuild -target MyApp -configuration AppStore BUNDLE_VERSION=`date "+%y%m%d"`

Build iphone/iOS apps with java ant and xcodebuild


<project name="cc-build" default="build" basedir="checkout">
<target name="build">
<delete dir="MyCocoaApp" />
<cvs command="co MyCocoaApp" />
<exec executable="xcodebuild" dir="MyCocoaApp" failonerror="true">
<arg line="-target MyCocoaApp -buildstyle Deployment build" />
</exec>
</target>
</project>

https://github.com/phonegap/phonegap-iphone/blob/master/build.sh
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html

find your computer's neighbourhood ip address by one linux command

Run below line as one command in linux

for i in `seq 0 254`; do sudo arping -I eth0 -c1 -f 192.168.1.$i; done |grep Unicast

Wednesday, February 9, 2011

linux & mysql shell shorcut - good for mobile ssh

Key Sequence

Meaning

Up arrow or Ctrl-P

Recall previous line

Down arrow or Ctrl-N

Recall next line

Left arrow or Ctrl-B

Move cursor left (backward)

Right arrow or Ctrl-F

Move cursor right (forward)

Escape b

Move backward one word

Escape f

Move forward one word

Ctrl-A

Move cursor to beginning of line

Ctrl-E

Move cursor to end of line

Ctrl-D

Delete character under cursor, Ctrl-U Clear the line before cursor position

Delete

Delete character to left of cursor

Escape D

Delete word

Escape Backspace

Delete word to left of cursor

Ctrl-K

Erase everything from cursor to end of line

Ctrl-_

Undo last change; may be repeated

Ctrl + Z
Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + R Let’s you search through previously used commands
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + K Clear the line after the cursor