As configured in my dotfiles.
start new:
tmux
start new with session name:
| require 'sinatra' | |
| get "/" do | |
| erb :form | |
| end | |
| post '/save_image' do | |
| @filename = params[:file][:filename] | |
| file = params[:file][:tempfile] |
| require 'bundler/capistrano' | |
| set :application, "net" | |
| set :repository, "[email protected]:net.git" | |
| set :scm, :git | |
| set :default_environment, { | |
| 'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
| } |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant::Config.run do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "precise64" |
| <form action="http://v0.api.upyun.com/rbtest/" method="post" enctype="multipart/form-data"> | |
| <%= upyun_form_input_tag(:return_url => new_post_path) %> | |
| <input type="file" name="file" /> | |
| <button type="submit">上传图片</button> | |
| </form> |
| set :domain, "licensing.lichfield-001.vm.brightbox.net" | |
| set :application, "licensing" | |
| set :deploy_to, "/home/rails/#{application}" | |
| set :user, "rails" | |
| set :use_sudo, false | |
| ssh_options[:forward_agent] = true | |
| set :scm, :git |
| ewoJInNpZ25hdHVyZSIgPSAiQXBNVUJDODZBbHpOaWtWNVl0clpBTWlKUWJLOEVk | |
| ZVhrNjNrV0JBWHpsQzhkWEd1anE0N1puSVlLb0ZFMW9OL0ZTOGNYbEZmcDlZWHQ5 | |
| aU1CZEwyNTBsUlJtaU5HYnloaXRyeVlWQVFvcmkzMlc5YVIwVDhML2FZVkJkZlcr | |
| T3kvUXlQWkVtb05LeGhudDJXTlNVRG9VaFo4Wis0cFA3MHBlNWtVUWxiZElWaEFB | |
| QURWekNDQTFNd2dnSTdvQU1DQVFJQ0NHVVVrVTNaV0FTMU1BMEdDU3FHU0liM0RR | |
| RUJCUVVBTUg4eEN6QUpCZ05WQkFZVEFsVlRNUk13RVFZRFZRUUtEQXBCY0hCc1pT | |
| QkpibU11TVNZd0pBWURWUVFMREIxQmNIQnNaU0JEWlhKMGFXWnBZMkYwYVc5dUlF | |
| RjFkR2h2Y21sMGVURXpNREVHQTFVRUF3d3FRWEJ3YkdVZ2FWUjFibVZ6SUZOMGIz | |
| SmxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1CNFhEVEE1TURZeE5U | |
| SXlNRFUxTmxvWERURTBNRFl4TkRJeU1EVTFObG93WkRFak1DRUdBMVVFQXd3YVVI |
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| # default.custom.yaml | |
| # save it to: | |
| # ~/.config/ibus/rime (linux) | |
| # ~/Library/Rime (macos) | |
| # %APPDATA%\Rime (windows) | |
| patch: | |
| schema_list: | |
| - schema: luna_pinyin # 朙月拼音 | |
| - schema: luna_pinyin_simp # 朙月拼音 简化字模式 |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
As configured in my dotfiles.
start new:
tmux
start new with session name: