A kitchen is a collection of recipes associated with a deployment. For example, a kitchen can contain cookbooks for installing Ruby, MySQL, and nginx.
knife init solo kitchen_name
This will create the necessary stucture for the kitchen.
require "i18n" | |
class EmailAddress | |
VALID_EMAIL_ADDRESS_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i | |
def self.malformed?(email) | |
email !~ VALID_EMAIL_ADDRESS_REGEX | |
end | |
def self.valid?(email) |
<% flash.each do |key, message| %> | |
<%= content_tag :div, class: "alert alert-full-page alert-#{key} alert-dismissable", role: "alert" do %> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
<%= message %> | |
<% end %> | |
<% end %> |
A Pen by Mohamad El-Husseini on CodePen.
$(document).on('ready page:change', function() { | |
$('selector').tooltip('show'); | |
}); |
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
- provide :title, ts(:title) | |
- page_header :projects | |
= form_for [@workspace, @project, Upload.new], html: { class: 'form-horizontal' } do |f| | |
div class="panel panel-default panel-upload" | |
/ div class="panel-heading" | |
div class="panel-title" Upload Files | |
/ div class="panel-body text-center" |
This describes the workflow to use Heroku as a staging environment. It assumes you already have an existing heroku app in production.
# rename your git remote heroku to something else like production
git remote rename heroku production
# so now you will push as: git push production master
# create the staging app
heroku apps:create staging-appname
@doc ~s""" | |
Takes a string and an atom that refers to any function name in `Gibran.Counter`. | |
It tokenises the string, then applies the given function to the resulting tokens. The function | |
name must be an `atom`. You can pass a list of options to the tokeniser as `opts` and a list | |
of options to the receiving function as `fn_opts`. | |
For example, the following two calls are equivalent: | |
Gibran.from_string("The Prophet", :token_count) |