$ rvm --rvmrc --create ruby-2.2.0@gemset
$ rvm --create --ruby-version ruby-2.2.2@genesis
| string = "nameLolApiTruc" | |
| # "nameLolApiTruc" | |
| string!.gsub(/([a-z\d])([A-Z])/,'\1_\2') | |
| # "name_Lol_Api_Truc" | |
| string.downcase.to_sym | |
| # :name_lol_api_truc | |
| # methods examples extend String and Hash class | |
| class String | |
| def to_symbol |
| # Gemfile | |
| gem 'omniauth' | |
| gem 'omniauth-facebook' |
| $ rake my_task id=user.id |
Start node.js
| # search commit | |
| $ git log | |
| # go to commit | |
| $ git reset --hard 176ez2z5... | |
| # force push | |
| $ git push origin your_branch -f |
| > Time.zone | |
| => (GMT+01:00) Europe/Paris | |
| > Time.zone.parse("07/06/2017 16:00").to_datetime | |
| => Wed, 07 Jun 2017 16:00:00 +0200 |
| set :application, "TEST" | |
| # repo details | |
| set :scm, :git | |
| set :scm_username, "git_name" | |
| set :repository, "git@github.com:git_name/repo_name.git" | |
| set :branch, "master" | |
| set :git_enable_submodules, 1 | |
| # main details |
| # ~/Backup/models/production.rb | |
| Backup::Model.new(:production, 'Descritpion') do | |
| require 'json' | |
| notify_by HttpPost do |post| | |
| post.on_success = true | |
| post.on_warning = true | |
| post.on_failure = true |
| # listing all rake command | |
| $ rake -P | |
| # listing task | |
| $ rake -T |