Skip to content


Linux修改密码错误

test

Posted in No-name.

git tag和branch操作

代码管理中不可避免的要涉及到tag和branch操作,git的方式跟svn等有些不同,最不同的就是远程删除tag和branch了:

远程tag操作, 想创建一个tag这样操作:

git tag v2.4

git push origin v2.4

这样在远程端就有了一个名字为”v2.4″的tag, 如果想删除该tag,这样操作:

git push origin :refs/tags/v2.4

Branch 操作跟tag相仿,现在本地创建一个branch:

git branch test

然后push到远端:

git push origin test

这样查看远端的branch列表:

git branch -r

不加”-r”就显示本地的branch列表.删除一个branch操作如下:

git push origin :heads/test

Posted in Git.

函数调用的参数检查

看”Reachability”的代码时发现的, 这样检查一个参数:

Reachability* curReach = [note object];

NSParameterAssert([curReach isKindOfClass: [Reachability class]]);

这个NSParameterAssert其实就是一个简单的Assert,但名字很明确,这样写有助于代码维护.

Posted in No-name.

我回来了

决定继续维护这个Blog…

Posted in .

iPhone Push Notification 调试步骤

1. 确保你的Beejive 或者 IM+可以顺利的收到Push消息.

2.确保你在dev portal里面生成了一个支持push的profile,

3.确保该profile包含的App ID 跟自己应用里面的xxx-info.plist里面的Bundle identifier一致.

3.确保设备上的profile是该profile

4.确保你是用该profile来编译的应用,

5. Enjoy!

Posted in No-name. Tagged with .

Three20中的 -all_load问题

如果在使用Three20的过程中遇到只能在模拟器中跑而不能在device上运行的情况,请在 ““Other Linker Flags”里面添加 “-all_load”参数, 不过这样以来很有可能导致程序在模拟器中运行不正常…

Posted in No-name. Tagged with .

could not build the server_names_hash, you should increase server_names_hash_bucket_size

Edit the configuration file here:

vim /etc/nginx/nginx.conf

Add a new line in http section :

server_names_hash_bucket_size 64;

All done!

Posted in No-name. Tagged with .

How to find out zombie process?

ps aux | awk ‘{ print $8 ” ” $2 }’ | grep -w Z

Posted in 老帖. Tagged with .

symbolicatecrash 定位Crash

官方文档在这里: http://developer.apple.com/iphone/library/technotes/tn2008/tn2151.html#SYMBOLICATION

这里有一篇讲解的比较好的文章: http://furbo.org/2008/08/08/symbolicatifination/

Symbolicatecrash是一个perl脚本,

2.x的存放位置:

<DEVELOPER_TOOLS_INSTALL_LOCATION>/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneRemoteDevice.xcodeplugin/Contents/Resources/

3.0的 存放位置改变了:

/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources

最好把这个东西拷贝到你的path中, 方便使用

Crash文件存放的位置在这里: Mac OS X: ~/Library/Logs/CrashReporter/MobileDevice/<DEVICE_NAME>


注意: .dSYM文件要保存, 这个.dSYM里面存放的是该二进制文件偏移位置和相应函数的对应关系.所以如果想把crash log里面的crash位置转换成相应的函数以上这两个文件缺一不可.

Posted in 移动开发. Tagged with , .

" Python support for SSL and HTTPS is not installed" issue.

Posted in 移动开发. Tagged with .