- Format MacOs to have latest OS
- Install Xcode:
xcode-select --install
- Install Homebrew and cask:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cask
The credentials are stored in the "credentials.yml.enc" file, encrypted. | |
To decrypt the credentials file, you need a master key that is set on either: | |
* config/master.key file (for local development) | |
* ENV["RAILS_MASTER_KEY"] (for deployed environments) | |
What should you commit? | |
* The file config/master.key should be ignored in gitignore (you should not commit the master key) | |
* The file credentials.yml.enc should be commited along with the codebase (but don't worry, only those who have the master key can decrypt it) |
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cask
{ | |
"font_size": 17, | |
"margin": 2, | |
"translate_tabs_to_spaces": true, | |
"tab_size": 2, | |
"trim_automatic_white_space": true, | |
"open_files_in_new_window": "never", | |
"ensure_newline_at_eof_on_save": true, | |
"trim_trailing_white_space_on_save": "all", | |
} |
Whenever selenium tests are not working anymore do this:
brew reinstall chromedriver
If I then get a:
"chromedriver” cannot be opened because the developer cannot be verified. Unable to launch the chrome browser
then, find chromedriver binary path:
SELECT | |
table_name, | |
pg_size_pretty(pg_total_relation_size(quote_ident(table_name))), | |
pg_total_relation_size(quote_ident(table_name)) as "Raw size" | |
FROM information_schema.tables | |
WHERE table_schema = 'public' | |
ORDER BY 3 DESC; |
If you want to find out the commits that changed a line with a given string:
git log -S string ./file
Eg.
One word: git log -S deleted_method_name ./app/models/accounts/account.rb
Multiple words: git log -S "def deleted_method_name" ./app/models/accounts/account.rb
Use -G for regex pattern matching