#Go to the release branch
git checkout RELEASE_date
#Pull the last changes
git pull origin RELEASE_date
#Go to the release branch
git checkout RELEASE_date
#Pull the last changes
git pull origin RELEASE_date
All mails received by a user are stored into: /var/mail/username
Open mailbox without initial display: mail -N
Then delete all mails: d *
| Pandas, Numpy, SciPy - libraries for vectorized calculations of non structured data | |
| Folium - geographic data | |
| iPython - work environment | |
| List ~ Array (methods: append, insert, del) | |
| Dictionary (dict) ~ Hash | |
| .type ~ .class | |
| | ~ || | |
| & ~ && |
| class MyModel < ActiveRecord::Base | |
| scope :custom_scope, -> { where.not(id: [1, 2, 3]) } # id not in (1, 2, 3) <=> id != 1 and id != 2 and id != 3 | |
| def self.class_method | |
| all.each { |x| puts x } | |
| end | |
| def to_s | |
| 'Hey' | |
| end |
| gid = class_instance.to_global_id # method allowing to get a string with both model name and id | |
| GlobalID::Locator.locate(gid) # method of getting the object by its global id (very useful for collections of multiple type of objects, e.g. for polymorphic associations) | |
| Example : | |
| In the model that has a polymorphic attribute detailable: | |
| getter: | |
| def global_detailable | |
| detailable.to_global_id if detailable.present? |