| Rule | Class name | Filename |
|---|---|---|
| All models are singular | Note | note.rb |
| All controllers are plural | Notes | notes_controller.rb |
| View folder names are plural | - | notes/index.html.haml |
rails new <project-name> # create a new project
Boxes cd ~/.vagrant.d/boxes
vagrant box list
vagrant box add centos65-x86_64-20140116 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box
vagrant init centos65-x86_64-20140116
Django default shell is boring. To make it interactive we need ipython and shell_plus. shell_plus does auto imports.
pip install ipython
pip install django_extensions
Update in settings.py file
INSTALLED_APPS = [
pip install django-reversion
Add reversion to INSTALLED_APPS
INSTALLED_APPS = [
...
...
...
| def using_context_info(event, context): | |
| info = { | |
| 'memory_limit_in_mb': context.memory_limit_in_mb, | |
| 'html_length': len(html) | |
| } | |
| return info | |
| def length_of_html(event, context): |
| import locale | |
| locale.setlocale( locale.LC_ALL, '' ) | |
| # for currency use locale.currency | |
| locale.format("%d", 1000000000, grouping=True) | |
| # o/p: 1,000,000,000 |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |