POST /oauth/token HTTP/1.1
Content-Type: application/json
{
"grant_type": "password",
"client_id": "CLIENT_ID",
"owner_type": "OWNER_TYPE",
"username": "OWNER_EMAIL",
"password": "OWNER_PASSWORD"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. SSH to server | |
| 2. $ sudo gem install backup | |
| 3. $ backup generate:model --trigger=db_backup --databases='postgresql' --storages='dropbox' | |
| 4. Edit the /Backup folder | |
| 5. Test it manually | |
| $ backup perform -t db_backup | |
| 6. Install whenever at /Backup folder | |
| $ sudo gem install whenever | |
| 7. $ mkdir config | |
| 8. $ wheneverize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # systemd unit file for Debian | |
| # | |
| # Put this in /lib/systemd/system | |
| # Run: | |
| # - systemctl enable sidekiq | |
| # - systemctl {start,stop,restart} sidekiq | |
| # | |
| # This file corresponds to a single Sidekiq process. Add multiple copies | |
| # to run multiple processes (sidekiq-1, sidekiq-2, etc). |
I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table