from http://linux-unix-tips.blogspot.nl/2014/01/set-up-regional-settings-with-command.html
sudo gedit /var/lib/locales/supported.d/local
sudo dpkg-reconfigure locales
sudo gedit /etc/default/locale
package main | |
import ( | |
"net/http" | |
"github.com/friendsofgo/graphiql" | |
graphql "github.com/graph-gophers/graphql-go" | |
"github.com/graph-gophers/graphql-go/relay" | |
) |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
"path" | |
) | |
func dirTree(out io.Writer, root string, printFiles bool) error { |
# https://editorconfig.org/#example-file | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true |
require 'securerandom' | |
puts SecureRandom.hex(64) |
comment = "# frozen_string_literal: true\n" | |
filemode = "r+" | |
dirs = Dir[Rails.root.join('spec/**/*.rb').to_s] + Dir[Rails.root.join('lib/**/*.rake').to_s] + Dir[Rails.root.join('lib/**/*.rb').to_s] | |
dirs.each do |filename| | |
contents = File.open(filename, "r") do |f| | |
f.read | |
end | |
contents = comment + contents |
default: &default | |
adapter: postgresql | |
encoding: unicode | |
pool: 5 | |
username: alabama_song | |
password: 1 | |
development: | |
<<: *default | |
database: alabama_song_development |
default: &default | |
adapter: mysql2 | |
encoding: utf8 | |
pool: 5 | |
username: root | |
password: | |
socket: /var/run/mysqld/mysqld.sock | |
development: | |
<<: *default |
from http://linux-unix-tips.blogspot.nl/2014/01/set-up-regional-settings-with-command.html
sudo gedit /var/lib/locales/supported.d/local
sudo dpkg-reconfigure locales
sudo gedit /etc/default/locale
# Database administrative login by Unix domain socket | |
local all postgres peer | |
# TYPE DATABASE USER ADDRESS METHOD | |
# "local" is for Unix domain socket connections only | |
local all all md5 | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 md5 | |
# IPv6 local connections: |
check my sql installation mysql -V
login as root mysql -u root -p
SELECT User FROM mysql.user;
- get list of the all database users
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
- create new use with specified password
GRANT ALL PRIVILEGES ON * . * TO 'aska'@'localhost';
- grant the all privileges
vim /etc/mysql/my.cnf
- mysql config file
sudo /etc/init.d/mysql restart