This file contains 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
$ semanage port -a -t ssh_port_t -p tcp 22222 |
This file contains 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
class Devise::SessionsController < DeviseController | |
prepend_before_action :require_no_authentication, only: [:new, :create] | |
prepend_before_action :allow_params_authentication!, only: :create | |
prepend_before_action :verify_signed_out_user, only: :destroy | |
prepend_before_action only: [:create, :destroy] { request.env["devise.skip_timeout"] = true } |
This file contains 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
# All Devise controllers are inherited from here. | |
class DeviseController < Devise.parent_controller.constantize | |
include Devise::Controllers::ScopedViews |
This file contains 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
# The parent controller all Devise controllers inherits from. | |
# Defaults to ApplicationController. This should be set early | |
# in the initialization process and should be set to a string. | |
mattr_accessor :parent_controller | |
@@parent_controller = "ApplicationController" |
This file contains 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
config.parent_controller = 'OtherController' |
This file contains 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
- hosts: all | |
remote_user: root | |
become: false | |
tasks: | |
- name: install epel-release | |
yum: | |
name: epel-release | |
state: present | |
become: true | |
- name: update packages |
This file contains 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
resource "google_compute_instance" "default" { | |
name = "test" | |
machine_type = "f1-micro" | |
zone = "us-east1-a" | |
disk { | |
image = "centos-7-v20170719" | |
} | |
network_interface { |
This file contains 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
resource "google_compute_instance" "default" { | |
name = "test" | |
machine_type = "f1-micro" | |
zone = "us-east1-a" | |
disk { | |
image = "centos-7-v20170719" | |
} | |
network_interface { |
This file contains 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
echo 'export GOROOT=/usr/lib/golang' >> ${HOME}/.bashrc |
This file contains 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
if [ "$(grep 'GOROOT' ${HOME}/.bashrc)" == "" ]; then | |
echo 'export GOROOT=/usr/lib/golang' >> ${HOME}/.bashrc | |
fi |