1. Clone the repository

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

2. Create a new zsh config by copying the zsh template we’ve provided.

NOTE: If you already have a ~/.zshrc file, you should back it up. cp ~/.zshrc ~/.zshrc.orig in case you want to go back to your original settings.

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

3. Set zsh as your default shell:

chsh -s /bin/zsh

这里有一些可用的主题
修改主题

vi ~/.zshrc

查找 ZSH_THEME

修改成你喜欢的主题风格即可

https://github.com/robbyrussell/oh-my-zsh/wiki/themes

more from https://github.com/robbyrussell/oh-my-zsh

屏幕快照 2012-03-18 上午10.07.47.png

以我最近使用的ruby语言做例子

1.运行脚本(这个大家都懂得)
cmd+R

2.查找本目录下的文件
cmd+T

屏幕快照 2012-03-11 下午1.12.18.png

3.补全方法,tab
比如你键入def+tab

屏幕快照 2012-03-11 下午1.13.33.png

4.查看方法
点击会跳转到该方法
屏幕快照 2012-03-11 下午1.15.59.png

5.打开文件目录
control+option+cmd+D

屏幕快照 2012-03-11 下午1.17.25.png

6.添加你的常用目录到favirator

屏幕快照 2012-03-11 下午1.18.23.png

下次只要点击那颗心就能转到列表

屏幕快照 2012-03-11 下午1.19.27.png

7.新建文件
option+cmd+n
然后cmd+s保存

遇到有用的再记下来

popoverController在有键盘的情况下,如果键盘的弹出试popover收缩,这会导致popoverController的尺寸恢复不到原来的大小(ios4.3有这问题,5.0版本正常)

找了很多资料,终于找到解决方案了

- (void)viewDidLoad
{
    [super viewDidLoad];
    popup = nil;        //my ViewController with UITextField
    popover = nil;      //my UIPopoverController
    NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
    [nc addObserver:self
           selector:@selector(resizePopup:)
               name:UIKeyboardDidHideNotification
             object:nil];
}

- (void)doDelayedResize
{
    [popover presentPopoverFromRect:myButton.bounds 
                                               inView:myButton 
                  permittedArrowDirections:UIPopoverArrowDirectionAny  
                                            animated:YES];
}

- (void)resizePopup:(NSNotification*)note
{
    [self performSelector:@selector(doDelayedResize) withObject:nil afterDelay:0.01]; 
}

这里有更多的解决方案 @from stackoverflow

删掉了系统自带的ruby,然后装了gcc,又用rvm自己安装了个ruby,具体可以参见这里
结果我的textmate无法运行ruby 的脚本了,参见大神(这里)的做法,自己做了些修改

$ /usr/bin/env ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.3.0]
$ /usr/bin/which ruby
/Users/welsonla/.rvm/rubies/ruby-1.9.3-p0/bin/ruby

$ sudo ln -s /Users/welsonla/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /usr/bin/ruby

Then press Command+R,it runs well

hope help for you

此处下载https://github.com/spf13/spf13-vim

放到~/目录下

执行

for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done

ln -s spf13-vim/.vimrc .vimrc
ln -s spf13-vim/.vim .vim

重启你的vim
官方blog,可以查看他的说明文档

http://spf13.com/post/ultimate-vim-config

效果如图,左右翻滚
屏幕快照 2011-12-14 下午1.17.43.png

关键代码

- (void)viewDidLoad
{
    //contentview与scrollview的高度设置为一样,这样图片就不可以上下拖动
    scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,250)];
    CGSize newSize = CGSizeMake(self.view.frame.size.width*3, 250);
    [scrollView setContentSize:newSize];
    
    [scrollView setPagingEnabled:YES];
    [scrollView setShowsVerticalScrollIndicator:NO];//不显示垂直滚动条
    [scrollView setShowsHorizontalScrollIndicator:NO];//不显示水平滚动条
    [scrollView setDelegate:self];
    [scrollView setBackgroundColor:[UIColor yellowColor]];//设置背景以区分view与scrollview
    
   
    [scrollView setMaximumZoomScale:5];
    [scrollView setMinimumZoomScale:0.2];
    [self.view addSubview:scrollView];
    
    //UIPageControl设置
    pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, 200,self.view.frame.size.width, 20)];
    [pageControl setHidesForSinglePage:YES];
    [pageControl setUserInteractionEnabled:YES];
    [pageControl setBackgroundColor:[UIColor redColor]];
    [pageControl setNumberOfPages:3];
    [pageControl setCurrentPage:0];
    [pageControl addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:pageControl];
    
    
    //切换的3个页面
    imageView1= [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,210)];
    [imageView1 setImage:[UIImage imageNamed:@"1.jpg"]];
    [scrollView addSubview:imageView1];
    [imageView1 release];
    
    imageView2= [[UIImageView alloc] initWithFrame:CGRectMake(self.view.frame.size.width, 0, 320, 210)];
    [imageView2 setImage:[UIImage imageNamed:@"2.jpg"]];
    [scrollView addSubview:imageView2];
    [imageView2 release];
    
    imageView3= [[UIImageView alloc] initWithFrame:CGRectMake(self.view.frame.size.width*2, 0, 320, 210)];
    [imageView3 setImage:[UIImage imageNamed:@"3.jpg"]];
    [scrollView addSubview:imageView3];
    [imageView3 release];
    
    [super viewDidLoad];
}


//滚动结束
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollViews{
    int pageNum = fabs(scrollView.contentOffset.x/self.view.frame.size.width);
    [pageControl setCurrentPage:pageNum];
    NSLog(@"dddaa,%d",pageNum);
}


//滚动调用
- (void)scrollViewDidScroll:(UIScrollView *)sender{
//    NSLog(@"ddd");
}


- (void)dealloc{
    [scrollView release];
    [imageView1 release];
    [imageView2 release];
    [imageView3 release];
    [pageControl release];
    [super dealloc];
}

//通过pageControl去改变scroll的显示内容
- (void)changePage:(id)sender{
    int page = [sender currentPage];
    CGRect frame = self.view.frame;
    frame.origin.x = frame.size.width*page;
    frame.origin.y = 0;
    [scrollView scrollRectToVisible:frame animated:YES];
}

点击下载:ScrollViewDemo.zip

p1328378698.jpg

You are the apple of my eye
《那些年我们一起追的女孩》

本文转自一位台湾ios开发者的blog,由于blog地址被墙掉,转发过来,供大家参考
原文地址:https://github.com/ccgus/fmdb
更多的使用,大家可以看看source中的README.markdown

将SRC目录下文件copy到项目下,去掉fmdb.m文件

屏幕快照 2011-12-11 下午1.45.08.png

...

使用ASIHTTPRequest 提示#import <libxml/HTMLparser.h>找不到
解决如下
在header search path 加入 ${SDK_DIR}/usr/include/libxml2

屏幕快照 2011-11-29 下午5.26.30.png

Other Linker Flags 加上-lxml2

屏幕快照 2011-11-30 下午2.16.37.png

在SQLite中有5种本地类型:INTEGER、REAL、TEXT、BLOB和NULL,