http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
http://guides.rubyonrails.org/migrations.html
--- | |
# ^^^ 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", |
#!/bin/sh | |
echo "\n --- delete index" | |
curl -X DELETE 'http://localhost:9200/' | |
echo "\n --- create index and put mapping into place" | |
curl -X POST 'http://localhost:9200/myindex/' -d '{ | |
"mappings" : { | |
"person" : { | |
"properties" : { |
server { | |
listen 80; | |
listen [::]:80; | |
server_name example.com www.example.com *.example.com; | |
include global/letsencrypt-redirect.conf; | |
} | |
server { | |
listen 443 ssl http2; |