Here I'll show you
- How to override devise registrations_controller(related to create/update user account)
- How to change redirect path after updating user
http://guides.rubyonrails.org/migrations.html
| #Developer : Anshul Patel | |
| #Put the file in /etc/systemd/system | |
| #Make sure that the elasticsearch and run directory have permission of appropriate user | |
| #In order to start it during boot, sudo systemctl enable elasticsearch | |
| [Unit] | |
| Description=ElasticSearch Service | |
| After=network.target | |
| [Service] |
| --- | |
| # ^^^ YAML documents must begin with the document separator "---" | |
| # | |
| #### Example docblock, I like to put a descriptive comment at the top of my | |
| #### playbooks. | |
| # | |
| # Overview: Playbook to bootstrap a new host for configuration management. | |
| # Applies to: production | |
| # Description: | |
| # Ensures that a host is configured for management with Ansible. |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| --- | |
| # Deploy rails app from localhost to remote servers | |
| - name: Set up AWS infrastructure | |
| hosts: localhost | |
| connection: local | |
| roles: | |
| - setup_aws | |
| - name: Package app |
There are two main modes to run the Let's Encrypt client (called Certbot):
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com.
HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.
| # Index | |
| --------------------------------------------------------------------- | |
| curl -XPUT http://localhost:9200/pictures/ -d ' | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "index_analyzer": { | |
| "tokenizer": "standard", |