sudo vi /etc/sysconfig/selinux
Then change the directive SELinux=enforcing to SELinux=disabled
Reboot server.
| # yum update | |
| # yum install gcc make kernel-devel bzip2 | |
| # reboot | |
| # mkdir -p /media/cdrom | |
| # mount /dev/sr0 /media/cdrom | |
| # sh /media/cdrom/VBoxLinuxAdditions.run |
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
sudo apt-get install jenkins
sudo service jenkins start
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
| class MyController < ApplicationController | |
| def options | |
| options = {} | |
| available_option_keys = [:first_option, :second_option, :third_option] | |
| all_keys = params.keys.map(&:to_sym) | |
| set_option_keys = all_keys & available_option_keys | |
| set_option_keys.each do |key| | |
| options[key] = params[key] | |
| end | |
| options |
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' WITH GRANT OPTION;
Stop mysqld and restart it with the --skip-grant-tables option.
Connect to the mysqld server with just: mysql (i.e. no -p option, and username may not be required).
Issue the following commands in the mysql client:
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| defaults write .GlobalPreferences com.apple.mouse.scaling -1 |
| require 'active_record/connection_adapters/abstract_mysql_adapter' | |
| module ActiveRecord | |
| module ConnectionAdapters | |
| class AbstractMysqlAdapter | |
| NATIVE_DATABASE_TYPES[:string] = { :name => "varchar", :limit => 191 } | |
| end | |
| end | |
| end |
| def dirReduc(arr) | |
| dir = {"NORTH" => "SOUTH", "SOUTH" => "NORTH", "WEST" => "EAST", "EAST" => "WEST"} | |
| length = arr.length | |
| result = [] | |
| arr.each do |w| | |
| if result.last != dir[w] | |
| result << w | |
| else | |
| result.pop | |
| end |