- 警告:請絕對不要跳著裝!*
> sudo apt-get update > sudo apt-get upgrade > sudo apt-get install git
| # 30 minutes Lisp in Ruby | |
| # Hong Minhee <http://dahlia.kr/> | |
| # | |
| # This Lisp implementation does not provide a s-expression reader. | |
| # Instead, it uses Ruby syntax like following code: | |
| # | |
| # [:def, :factorial, | |
| # [:lambda, [:n], | |
| # [:if, [:"=", :n, 1], | |
| # 1, |
| # zh-CN translations for Typus (template) | |
| # by ZoOL <http://github.com/zhooul> | |
| zh-CN: | |
| "A valid token is required": "需要验证令牌" | |
| "Actions": "动作" | |
| "Active": "已激活" | |
| "Add": "新增" | |
| "Add %{resource}": "新增 %{resource}" | |
| "Add new": "新增" |
| source 'http://rubygems.org' | |
| # -------------------- | |
| # gems主要来源说明 | |
| # -------------------- | |
| =begin | |
| A.fredwu分享的gemfile | |
| http://thoughtrails.com/episodes/24-popular-and-useful-plugins-for-rails3 |
| source 'http://rubygems.org' | |
| # -------------------- | |
| # gems主要来源说明 | |
| # -------------------- | |
| =begin | |
| A.fredwu分享的gemfile | |
| http://thoughtrails.com/episodes/24-popular-and-useful-plugins-for-rails3 |
| <div class="user_navigation"> | |
| <% if user_signed_in? %> | |
| Hi! <%= current_user.email %> | |
| <%= link_to("Sign out", destroy_user_session_path)%> | |
| <% else %> | |
| <%= link_to "Sign in", new_user_session_path %> | |
| <%= link_to "Sign up", new_user_registration_path %> | |
| <% end %> | |
| </div> |
| set :application, "forum_demo" | |
| set :domain, "tech.yangzhiping.com" | |
| set :repository, "[email protected]:cngithub/xdite.git" | |
| set :deploy_to, "/home/apps/forum_demo" | |
| role :app, domain | |
| role :web, domain | |
| role :db, domain, :primary => true | |
| set :deploy_via, :remote_cache |
| def index | |
| @${1:things} = ${2:Thing}.find :all | |
| respond_to do |format| | |
| format.html # index.html.erb | |
| format.xml { render :xml => @$1 } | |
| end | |
| end | |
| def show |
| # 理解JavaScript的prototype属性 | |
| # | |
| # 类Dog - 类名称 | |
| # 属性name - 类Dog的对象属性 | |
| # 类属性species - 类Dog的类属性 | |
| # 对象dog_a - 类Dog的对象 | |
| # 对象dog_b - 类Dog的对象 | |
| # | |
| # 类属性species是prototype对象的属性; | |
| # 类Dog.prototype是实例对象共享的对象; |
| // 理解类的方法 | |
| // | |
| // 第一段代码是使用默认类,定义和使用函数 | |
| // 第二段代码是使用类<类Person>,定义和使用函数 | |
| // | |
| // 函数吃 - 函数名称 | |
| // 属性修饰 - 属性名称 | |
| // 属性食品 - 属性名称 | |
| // 类人 - 类名称 | |
| // 对象道喜 - 类的对象名称 |