$ > sudo mysql -uroot
mysql > SELECT User, Host FROM mysql.user;
mysql > DROP USER 'root'@'localhost';
| source 'https://rubygems.org' | |
| # default gems here | |
| #--------------------------- | |
| # add paperclip and bootstrap | |
| gem "paperclip", "~> 4.1" | |
| gem 'bootstrap-sass', '~> 3.1.1' |
| <% [:notice, :error, :alert].each do |level| %> | |
| <% unless flash[level].blank? %> | |
| <div data-alert="alert" class="alert alert-<%= flash_class(level) %> fade in"> | |
| <a class="close" data-dismiss="alert" href="#">×</a> | |
| <%= content_tag :p, flash[level] %> | |
| </div> | |
| <% end %> | |
| <% end %> |
$ > sudo mysql -uroot
mysql > SELECT User, Host FROM mysql.user;
mysql > DROP USER 'root'@'localhost';
The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.
Example:
# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.comThis lets you set the preload headers for your assets, so that the browser can start fetching them before it begins parsing HTML.
| FROM node:7.10-alpine | |
| RUN mkdir -p /opt/app | |
| WORKDIR /opt/app | |
| COPY ./package.json /opt/app | |
| RUN apk add --update --no-cache tini &&\ | |
| apk add --virtual .build-dependencies make gcc g++ python &&\ | |
| npm install --production &&\ |
| import React, { Component } from 'react' | |
| import { Redirect } from 'react-router' | |
| export default class ContactForm extends Component { | |
| constructor () { | |
| super(); | |
| this.state = { | |
| fireRedirect: false | |
| } | |
| } |
| #app/controllers/application_controller.rb | |
| class ApplicationController < ActionController::Base | |
| def opensearch | |
| response.headers['Content-Type'] = 'application/opensearchdescription+xml; charset=utf-8' | |
| end |
| unless Rails.env.production? | |
| connection = ActiveRecord::Base.connection | |
| connection.tables.each do |table| | |
| connection.execute("TRUNCATE #{table}") unless table == "schema_migrations" | |
| end | |
| sql = File.read('db/import.sql') | |
| statements = sql.split(/;$/) | |
| statements.pop |