welsonla's blog

Categories · 技术随笔

Home

About

Archives

blog with github(4)-开始写吧,骚年

Octopress提供很多的Rake任务去创建post和pages,他还会根据你的posts来生成Category,你可以在atom.xml或者blog/categories/<category>/atom.xml中找到这些内容 ####Post 这些Post页面必须存放在Source/_posts目录下面,并且命名方式和jekyll的命名方式一样,会转换成YYYY-MM-DD-Post-title.markdown,这个文件的名字就是你的blog的url slug,日期帮助你排序这些文章 rake new_post["Title"] 在使用了ZSH的话,你要这样创建 rake new_post或者rake new_post[\"Title\"] 例如..

Read more

blog with github(3)-Octopress配置

Octopress的配置相当的简单,并且一般配置完成后,你不需要再对Rakefile和_config文件进行修改,下面这些是Octopress的配置文件 _config.yml # Main config (Jekyll's settings) Rakefile # Configs for deployment config.rb # Compass config config.ru # Rack config Rakefile大多是与部署相关的配置,如果不需要同步的话,你就不需要进行修改 ####Blog配置 _config.yml有三部分配置,你必须修改url,并且title,subtitle和author也要修改,还有一些第三方的服务需要..

Read more

blog with github(2)-部署到github

###使用github pages 如果想使用 http://username.github.io 的域名作为你的blog地址的话,首先要创建一个仓库,名字为你的用户id.github.io(比如我的是welsonla.github.io) 用户使用的是Github Pages的master版本下面的public作为你的网站主目录,你可以通过浏览http://username.github.io 来查看。如果你想在source这个版本上面维护代码,并且把内容提交到master分支,Octopress有一个命令来帮助你完成这些 rake setup_github_pages 然后,他将 询问你的github pages的url 将远程的重‘origin’重命名为‘octopress’ 在远程的origi..

Read more

blog with github(1)-前期准备

##开始之前 安装Git 使用rbenv或者RVM安装ruby 1.9.3 安装完后确保你的ruby版本是1.9.3 ruby -v ##设置Octopress git clone git://github.com/imathis/octopress.git octopress cd octopress 接下来安装一些依赖 gem install bundler rbenv rehash bundle install 安装Octopress默认主题 rake install –未完待续,哥去睡觉

Read more

different of class and category

当需要重写父类中的方法时,这时候定义子类 @interface JADanSideController : JASidePanelController @end @implementation JADanSideController - (UIBarButtonItem *)leftButtonForCenterPanel{ UIButton *leftBarButton = [UIButton buttonWithType:UIButtonTypeCustom]; [leftBarButton setFrame:CGRectMake(0, 0, 44, 30)]; [leftBarButton setBackgroundImage:[UIIma..

Read more

生成 github SSH keys

本文主要来自github官方,Generating SSH Keys cd ~/.ssh ssh-keygen -t rsa -C "your_email@example.com" 下面的步骤可以只敲回车进行确认即可 Creates a new ssh key using the provided email Generating public/private rsa key pair. #这里直接回车就会生成一个默认名为id_rsa Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter] #这里需要你输入一个你加密的key(一定要记住) Enter passphrase (empty for no..

Read more

使用RVM安装ruby

今天突然发现ruby版本不小心又回到了1.8.7,可能是我修改了rvm的配置文件导致的,于是开始折腾安装rvm和ruby 首先还是先安装Homebrew吧很简单,一行代码搞定 ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" 安装RVM curl -L https://get.rvm.io | bash -s stable --ruby 走着走着发现出错了 Missing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxml2, libxslt, libksba, openssl, sqlite. RVM au..

Read more