Handle URL open from other apps in iOS

For short, declare UTImportedTypeDeclarations(for types that are not predefined as System Uniform Type Identifiers), CFBundleDocumentTypes in Info.plist, UIApplicationLaunchOptionsURLKey in

[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey]

And for multitask apps, additionally respond to

(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation // for iOS 4.2+

or

(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url // for iOS 2.0+, deprecated.

One little trick to handle ALL file types:

	<key>CFBundleDocumentTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeName</key>
			<string>All Files</string>
			<key>LSItemContentTypes</key>
			<array>
				<string>public.data</string>
				<string>public.content</string>
			</array>
		</dict>
	</array>
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Default | Tagged | Leave a comment

Updated to WordPress 3.3

The new admin interface looks pretty good.
I like it.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Default | Tagged | 1 Comment

remove a symbol from multiple platform Mach-O file

For Mach-O fat binaries that contains multiple platforms, stripping symbol may not work as you would expect.
So you have to extract the executables/libraries from Mach-O and thin it using lipo. Then you can remove the .o file you don’t like by “ar -d <.a> <.o>” or strip the symbol by “strip” which is no longer necessary.
After that, do the reverse steps to pack it back to a multiple platform Mach-O file.

Well, this post *may* be the last post this year.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Default | Tagged , , , , , | Leave a comment

zzxy.feuvan.net reloaded.

with telnet/ssh/web.

Thanks to ipv6, tunnel by he.net.
And datapipe6.c, lol.

As nginx mod_proxy doesn’t support ipv6 upstream, here is the workaround:
datapipe6 localhost 56789 2001:da8:200:900e:200:5efe:a66f:480c 80
And nginx config:

server {
listen 80;
server_name zzxy.feuvan.net;

location / {
proxy_pass http://localhost:56789;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache_valid 10m;
}
location ~* \.(jpg|jpeg|bmp|png|gif|mp3)$ {
proxy_pass http://localhost:56789;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache two;
proxy_cache_key “$scheme$host$request_uri”;
proxy_cache_valid 600m;
}
}

Cernet sux.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Default | Tagged , , | Leave a comment

Just upgrade to 3.0.4

Don’t pwn my blog site.

For the security patch, http://wordpress.org/news/2010/12/3-0-4-update/

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Default | Tagged | Leave a comment