- Installation
- Create PostgreSQL Cluster
- Connect to a PostgreSQL Cluster
- psql
- pgAdmin
- Updating PostgreSQL Cluster
- High Availability
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 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 |
https://stackoverflow.com/questions/25848475/unable-to-install-npm-bcrypt-on-ubuntu
apt-get install node-gyp
Mac
https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md
- install node-gyp v7 global
- This issue is caused by https://www.npmjs.com/package/bcrypt and in this link suggest use version >=3.0.6 for node >=12
getInitialProps
only works with component exported default by the page.- Navigation via
<a>
will reload page because it call to remote API server, to navigation on client side let use wrapper componentLink
from "next/link"
A. JDK
- install
jenv
bybrew install jenv
, install gradle bybrew install gradle
- list installed java
jenv versions
- install jdk by
brew cask install java
- list all installed jdk
/usr/libexec/java_home -V
- add JDK to jenv by
jenv add <path>
(paths get from step 4). egjenv add /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
- set JDK used by
jenv global <name>
(name get from step 2)
B. GRADLE
- specify build errors by
./gradlew --scan
. At this step we can know what errors occurred (usually is mismatch versions of lib or JDK)
Cannot route message for exchange 'reply.celery.pidbox': Table empty or key no longer exists
This issue occurred on kombu version 4.6.5
Try to upgrade to 4.6.7 the issue will be fixed
- create a file to keep environment variables (called env.sh here) at /etc/profile.d/env.sh
- export two proxy variable in /etc/profile.d/evn.sh as below
export http_proxy=http://<ip/name>:<port>
export https_proxy=$http_proxy
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
# Send POST request with data to github api to create a gist | |
curl --user "<username>" --request POST --data '{"description": "Test create a github gists via api", "public": "true", "files": {"test.txt": {"content": "Hello"}}}' https://api.github.com/gists | |
# or in short | |
curl -u "<username>" -X POST -d '{"description": "Test create a github gists via api", "public": "true", "files": {"test.txt": {"content": "Hello"}}}' https://api.github.com/gists | |
# or more short, if supplied -d (data) POST method can ommited as below | |
curl -u "<username>" -d '{"description": "Test create a github gists via api", "public": "true", "files": {"test.txt": {"content": "Hello"}}}' https://api.github.com/gists | |
# Send POST request with multiple data | |
curl --data "login=<username>" --data "token=<token_string>" https://github.com/api/v2/json/user/show/<username> | |
# or combine into single --data |
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
#!/usr/bin/env bash | |
sudo apt -y update && sudo apt upgrade -y && \ | |
sudo apt -y install apt-transport-https ca-certificates wget gnupg && \ | |
wget -q -O - "https://repos.ripple.com/repos/api/gpg/key/public" | \ | |
sudo apt-key add - && \ | |
echo "deb https://repos.ripple.com/repos/rippled-deb bionic stable" | \ | |
sudo tee -a /etc/apt/sources.list.d/ripple.list && \ | |
sudo apt -y update && sudo apt -y install rippled && systemctl status rippled.service && \ | |
sudo systemctl start rippled.service && sudo systemctl enable rippled.service |
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
pragma solidity ^0.4.19; | |
contract ERC20Basic { | |
string public constant name = "ERC20Basic"; | |
string public constant symbol = "BSC"; | |
uint8 public constant decimals = 18; | |
event Approval(address indexed tokenOwner, address indexed spender, uint tokens); |
NewerOlder