https://habrahabr.ru/post/204354/
bash> redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword //with ip
bash> redis-cli -s /tmp/redis.sock -p 6379 -a mysupersecretpassword //with socket
redis> AUTH mysupersecretpassword
https://habrahabr.ru/post/204354/
bash> redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword //with ip
bash> redis-cli -s /tmp/redis.sock -p 6379 -a mysupersecretpassword //with socket
redis> AUTH mysupersecretpassword
| #!/usr/bin/env python | |
| #coding:utf-8 | |
| import sys | |
| import os | |
| import glob | |
| import platform | |
| import re | |
| import random | |
| import string |
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
| DROP TABLE IF EXISTS time_dimension; | |
| CREATE TABLE time_dimension ( | |
| id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
| db_date DATE NOT NULL, | |
| year INTEGER NOT NULL, | |
| month INTEGER NOT NULL, -- 1 to 12 | |
| day INTEGER NOT NULL, -- 1 to 31 | |
| quarter INTEGER NOT NULL, -- 1 to 4 | |
| week INTEGER NOT NULL, -- 1 to 52/53 | |
| day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
| -- In pg_stat_statements, there is a problem: sometimes (quite often), it registers the same query twice (or even more). | |
| -- It's easy to check in your DB: | |
| -- | |
| -- with heh as ( | |
| -- select userid, dbid, query, count(*), array_agg(queryid) queryids | |
| -- from pg_stat_statements group by 1, 2, 3 having count(*) > 1 | |
| -- ) select left(query, 85) || '...', userid, dbid, count, queryids from heh; | |
| -- | |
| -- This query gives you "full picture", aggregating stats for each query-database-username ternary |
| CREATE TABLE testing_partition(patent_id BIGINT, date DATE) WITH ( OIDS=FALSE); | |
| CREATE OR REPLACE FUNCTION create_partition_and_insert() RETURNS trigger AS | |
| $BODY$ | |
| DECLARE | |
| partition_date TEXT; | |
| partition TEXT; | |
| BEGIN | |
| partition_date := to_char(NEW.date,'YYYY_MM_DD'); | |
| partition := TG_TABLE_NAME || '_' || partition_date; |
In your command-line run the following commands:
brew doctorbrew update| 1. To begin, make sure that all the packages currently installed on your RHEL/CentOS 7 system are updated to their latest versions. | |
| # yum update -y | |
| 2. Next, installed all the required dependencies for the RDBMS, along with the zip and unzip packages. | |
| # yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip | |
| 3. Create the user account and groups for Oracle. | |
| # groupadd oinstall | |
| # groupadd dba |