See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
--- | |
hosts: all | |
tasks: | |
- name: add github ssh key | |
copy: > | |
src=files/id_rsa.github | |
dest=/root/.ssh/id_rsa.github | |
owner=root | |
group=root |
# There are 3 levels of git config; project, global and system. | |
# project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
# global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
# system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
# Create a project specific config, you have to execute this under the project's directory. | |
$ git config user.name "John Doe" | |
# Create a global config |
# Installation --- | |
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables. | |
# 2. Commit this file to your repo | |
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will | |
# push everything and initial GitFTP) | |
# | |
# Usage --- | |
# - On each commit to master branch, it'll push all files to the $FTP_HOST | |
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises | |
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64
.vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)Author: Josef Jezek
sudo apt-get install python-setuptools
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |
gem 'will_paginate', '~> 3.0'
to Gemfile%w(will_paginate will_paginate/active_record).each {|lib| require lib}
to config.ruSinatra::Base
and add include WillPaginate::Sinatra::Helpers
so that all views can use will_paginate
@users = User.paginate(:page => params[:page], :per_page => 30)
= will_paginate @users
will generate the pagersIf you want to style your pagers