- Installation
- Create PostgreSQL Cluster
- Connect to a PostgreSQL Cluster
- psql
- pgAdmin
- Updating PostgreSQL Cluster
- High Availability
This is insecure, fast-to-setup setup of simple master-slave replication with dockerized PostgreSQL installation.
Note, that below works with version postgres version 12.2
: postgres (PostgreSQL) 12.2 (Debian 12.2-1.pgdg100+1)
.
Preparation:
# This is where your primary database files will be stored
Ứng dụng giúp sắp xếp các TNV theo nhóm, mỗi nhóm sẽ làm việc 1 tuần, hoặc số ngày cố định, tùy chương trình.
- Admin tạo chương trình mới, đặt tên, đặt ngày tháng bắt đầu và kết thúc, đặt ngày "mở đăng ký".
- Sinh khung thời gian làm việc (timeslot). Admin chỉ định số ngày mỗi khung sẽ kéo dài (mặc định là 7). Ứng dụng sẽ dựa vào ngày tháng của chương trình để sinh các slot.
- Tới ngày mở đơn đăng ký, địa chỉ của đơn đăng ký sẽ có thể được truy cập (public available).
- Khi truy cập link đăng ký, người dùng sẽ được yêu cầu đăng nhập, hoặc đăng ký nếu chưa có tài khoản.
The following example demonstrates the creation of a raw Omni transaction, which transfers 0.1 Test Omni with token identifier 2 from 1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc to 1Njbpr7EkLA1R8ag8bjRN7oks7nv5wUn3o, with a transaction fee of 0.0006 BTC. For the sake of a demonstration, more than one unspent output was consumed.
List unspent outputs for 1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc.
omnicore-cli "listunspent" 0 999999 '["1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc"]'
Pre-reqs:
- Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
- On macOS:
- Install XCode from the Mac App Store (or install the XCode command line utils).
- Have homebrew installed
- On Linux:
In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.
This is how the demonstration will load data:
a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';
b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.
cheat sheets. | |
$ command line ruby cheat sheets | |
PostgreSQL | |
---------- | |
Create the filesystem | |
---- | |
$ export PGROOT="/var/lib/postgres" | |
$ mkdir -p $PGROOT/data && chown postgres.postgres $PGROOT/data |
import { Injectable } from 'angular2/core'; | |
import { Storage } from './storage'; | |
import { CurrentUser } from '../interfaces/common'; | |
@Injectable() | |
export class Authentication{ | |
private _storageService : Storage; | |
private _userKey : string = "CURRENT_USER"; | |
constructor(storageService : Storage){ |
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL