tar -zcvf tar-archive-name.tar.gz source-folder-name
tar -zxvf tar-archive-name.tar.gz
| --- | |
| development: | |
| cloud_name: cloud_name | |
| api_key: 'api_key' | |
| api_secret: api_secret | |
| enhance_image_tag: true | |
| static_image_support: false | |
| production: | |
| cloud_name: cloud_name | |
| api_key: 'api_key' |
| ===Install Octopress=== | |
| git clone git://github.com/imathis/octopress.git | |
| cd octopress | |
| gem install bundler rake --no-rdoc --no-ri | |
| bundle install | |
| rake install | |
| ===Start Blogging=== |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
| class UsersController < ApplicationController | |
| def new | |
| @user = UserInformation.new | |
| end | |
| def index | |
| @users = UserInformation.all | |
| end |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rvm' # for rvm support. (http://rvm.io) | |
| set :domain, 'deploy@host' | |
| set :repository, 'git... | |
| set :branch, 'master' | |
| set :shared_paths, ['config/database.yml', 'config/application.yml', 'log', 'tmp/sockets', 'tmp/pids'] |
| # config/deploy.rb | |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rvm' | |
| # ter_mode 这个要设置,不然在 mac 下输密码有问题 | |
| set :term_mode, nil | |
| set :rvm_path, '/usr/local/rvm/bin/rvm' |
| # Mina Deploy | |
| # =========== | |
| # | |
| # Adapted from Creative deploy stack in Manabalss v4, Mar.2015, updated to support staging on Jun.2015 | |
| # On first deploy do: mina setup --verbose | |
| # Then do : mina deploy[initialize] --trace | |
| # | |
| # Usage examples: | |
| # mina deploy[soft,seed,compile] to=staging # deploy task with all options | a simple `mina deploy` will deploy to production | |
| # mina rake[db:seed] # for multi-argument tasks # mina 'rake[payments:refund[arg1\,arg2]]' |