| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.6.0 <0.8.0; | |
| import "../utils/EnumerableSet.sol"; | |
| import "../utils/Address.sol"; | |
| import "../utils/Context.sol"; | |
| /** | |
| * @dev Contract module that allows children to implement role-based access |
| pragma solidity ^0.6.0; | |
| import "github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC721/ERC721.sol"; | |
| contract InstNFT is ERC721("NFT-ONE", "NFTONE") { | |
| address public owner; |
sudo su postgres
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.
USE record_company;
CREATE TABLE test (
test_column int
);
ALTER TABLE test
ADD anothet_column varchar(255);
#Multisignature Accounts
Create a multisig account by listing all of the accounts in the multisig and specifying the threshold number of accounts to sign with the -T flag
$ goal account multisig new <my-account1> <my-account2> <my-account3> etc… -T 2
Create an unsigned transaction and write to file
$ goal clerk send --from <my-multisig-account> --to AZLR2XP4O2WFHLX6TX7AZVY23HLVLG3K5K3FRIKIYDOYN6ISIF54SA4RNY --fee=1000 --amount=1000000 --out="unsigned.txn"
Sign by the required number of accounts to meet the threshold.
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
db.getCollection('charging').
aggregate([
{
$match: {
userID: {
$in: ["5fe8711ba2850f540546a728", "607ea662b256fc6abffb8fb8"]
}
}
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user