Run:
bower install --save bootstrap-sass
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
# config/initializers/mongoid.rb | |
# convert object key "_id" to "id" and remove "_id" from displayed attributes on mongoid documents when represented as JSON | |
module Mongoid | |
module Document | |
def as_json(options={}) | |
attrs = super(options) | |
id = {id: attrs["_id"].to_s} | |
attrs.delete("_id") | |
id.merge(attrs) |
#!/bin/bash | |
# load enviroment variables and other necessary itemes (e.g. node via nvm) | |
source ~/.bash_profile | |
# Set Directory locations: | |
# | |
# WORKING_DIR -> The directory that actually houses the working code | |
WORKING_DIR="/home/<username>/editor.womenandtech.com" | |
# GIT_DIR -> The git repo DIR |
server { | |
listen 80; | |
server_name yourdomain.com; | |
root /home/yourUserAccount/yourdomain.com/dist; | |
index index.html; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} |
#!/usr/bin/env bash | |
export DEBIAN_FRONTEND="noninteractive" | |
export PASSWORD="H3ll0W0rld!" | |
sudo debconf-set-selections <<< "mariadb-server mysql-server/root_password password $PASSWORD" | |
sudo debconf-set-selections <<< "mariadb-server mysql-server/root_password_again password $PASSWORD" | |
sudo apt-get install software-properties-common | |
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 |
# /etc/mysql/conf.d/galera.cnf | |
[mysqld] | |
binlog_format=ROW | |
default-storage-engine=innodb | |
innodb_autoinc_lock_mode=2 | |
bind-address=0.0.0.0 | |
# Galera Provider Configuration | |
wsrep_on=ON |
#!/usr/bin/env bash | |
sudo -i | |
cd /etc/mysql/conf.d | |
wget https://gist.githubusercontent.com/raykao/027e42847392a0eafb6c7b51c3291191/raw/a328e20eb13e2e129101dea460e1bd592d7f1c3b/galera.cnf | |
sed -i "s/first_ip/$(ip -4 addr ls eth0 | awk '/inet / {print $2}' | cut -d"/" -f1)/g" galera.cnf |
{ | |
"$schema": "http://schema.management.azure.com/schemas/2016-09-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"deploymentPrefix": { | |
"type": "string", | |
"metadata": { | |
"description": "Deployment Prefix name. Added to the beginning of each resource." | |
} | |
}, |
{ | |
"$schema": "https://schema.management.azure.com/schemas/2016-09-01/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"deploymentPrefix": { | |
"type": "string" | |
}, | |
"indexCount": { | |
"type": "int" | |
}, |